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() }) }