Skip to content

Commit

Permalink
Add missing move events (#155)
Browse files Browse the repository at this point in the history
* Add missing move events

* Lint
  • Loading branch information
igoroctaviano authored Nov 4, 2024
1 parent 1dc53db commit b6f8797
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down Expand Up @@ -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() })
}

Expand Down

0 comments on commit b6f8797

Please sign in to comment.