From b6f87971dffbe3f5cbab627a9e0f63c0db4a78c4 Mon Sep 17 00:00:00 2001 From: Igor Octaviano Date: Mon, 4 Nov 2024 08:54:04 -0300 Subject: [PATCH] Add missing move events (#155) * Add missing move events * Lint --- src/viewer.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/viewer.js b/src/viewer.js index c441524..b71de72 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -1471,6 +1471,14 @@ class VolumeImageViewer { }) }) + this[_map].on('movestart', (event) => { + publish(this[_map].getTargetElement(), EVENT.MOVE_STARTED, { event }) + }) + + this[_map].on('moveend', (event) => { + publish(this[_map].getTargetElement(), EVENT.MOVE_ENDED, { event }) + }) + let clickEvent = null this[_map].on('pointermove', (event) => { @@ -5286,6 +5294,14 @@ class _NonVolumeImageViewer { keyboardEventTarget: document }) + this[_map].on('movestart', (event) => { + publish(this[_map].getTargetElement(), EVENT.MOVE_STARTED, { event }) + }) + + this[_map].on('moveend', (event) => { + publish(this[_map].getTargetElement(), EVENT.MOVE_ENDED, { event }) + }) + view.fit(projection.getExtent(), { size: this[_map].getSize() }) }