diff --git a/js/models/event_handler.js b/js/models/event_handler.js index 9a8e2a00..e276c75b 100644 --- a/js/models/event_handler.js +++ b/js/models/event_handler.js @@ -94,6 +94,11 @@ export default class EventHandler { return; } jsTargetLock.lock(); + + if (this.aladin.view.dragging) { + return; + } + const raDec = [position.ra, position.dec]; this.updateWCS(); this.model.set("_target", `${raDec[0]} ${raDec[1]}`); @@ -122,6 +127,12 @@ export default class EventHandler { } jsFovLock.lock(); // fov MUST be cast into float in order to be sent to the model + + const zoom = this.aladin.view.zoom; + if (zoom.isZooming && fov != zoom.finalZoom) { + return; + } + this.updateWCS(); this.update2AxisFoV(); this.model.set("_fov", parseFloat(fov.toFixed(5))); @@ -149,7 +160,6 @@ export default class EventHandler { /* Rotation control */ this.model.on("change:_rotation", () => { - this.updateRotation(this.model.get("_rotation"), this.aladinDiv); // Update WCS and FoV only if this is the last div this.updateWCS(); this.update2AxisFoV(); diff --git a/src/ipyaladin/widget.py b/src/ipyaladin/widget.py index 0b340014..ede60b95 100644 --- a/src/ipyaladin/widget.py +++ b/src/ipyaladin/widget.py @@ -345,8 +345,6 @@ def rotation(self, rotation: Union[float, Angle]) -> None: rotation = rotation.deg if np.isclose(self._rotation, rotation): return - self._wcs = {} - self._fov_xy = {} self._rotation = rotation self.send({"event_name": "change_rotation", "rotation": rotation})