Commit 96e8e6f7 authored by vertighel's avatar vertighel
Browse files

fits-viewer.js: non perdere la dinamica manuale col drag quando Auto e' attivo

_endRightDrag() modificava vmin/vmax senza disattivare autoUpdate, a
differenza dell'input testuale (applyPrimaryRange). Con Auto ancora
attivo, il refresh successivo via telemetria sovrascriveva la dinamica
scelta manualmente col range auto del server dopo circa un secondo.

Ora il drag disattiva autoUpdate e sblocca la checkbox "Auto", come
gia' fa la modifica testuale.
parent 1d05e405
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1197,6 +1197,11 @@ export class FitsViewer {
    async _endRightDrag() {
        if (!this._rdrag) return;
        this._rdrag = null;
        // Manual range edit: stop the auto-update refresh from overwriting it
        // with the server's auto-range on the next telemetry-triggered refresh.
        this._primary.autoUpdate = false;
        const chkAuto = this.root.querySelector('.ctrl-auto');
        if (chkAuto) chkAuto.checked = false;
        // PNG mode: re-fetch at the new range.  FITS mode: already rendered by GPU.
        if (this._primary.mode === 'png') await this._renderPng();
        await this._refreshPanoramic();