fix: Call zoomChanged event after updating the zoom (#940)

The zoomChange method was not being called on the extensions, and this
commit fixes this by calling the runExtensions method after updating the
zoom.
This commit addresses issue SVG-Edit/svgedit#896
master
Mo'ath Zaghdad 2024-01-14 17:21:05 -05:00 committed by GitHub
parent 19403a2755
commit 24f78d3d0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -824,6 +824,7 @@ class Editor extends EditorStartup {
* @param {module:svgcanvas.SvgCanvas#event:zoomed} bbox
* @param {boolean} autoCenter
* @listens module:svgcanvas.SvgCanvas#event:zoomed
* @fires module:svgcanvas.SvgCanvas#event:ext_zoomChanged
* @returns {void}
*/
zoomChanged (win, bbox, autoCenter) {
@ -865,6 +866,11 @@ class Editor extends EditorStartup {
}
this.zoomDone()
this.svgCanvas.runExtensions(
'zoomChanged',
/** @type {module:svgcanvas.SvgCanvas#event:ext_zoomChanged} */ this.svgCanvas.getZoom()
)
}
/**