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#896master
parent
19403a2755
commit
24f78d3d0f
|
@ -824,6 +824,7 @@ class Editor extends EditorStartup {
|
||||||
* @param {module:svgcanvas.SvgCanvas#event:zoomed} bbox
|
* @param {module:svgcanvas.SvgCanvas#event:zoomed} bbox
|
||||||
* @param {boolean} autoCenter
|
* @param {boolean} autoCenter
|
||||||
* @listens module:svgcanvas.SvgCanvas#event:zoomed
|
* @listens module:svgcanvas.SvgCanvas#event:zoomed
|
||||||
|
* @fires module:svgcanvas.SvgCanvas#event:ext_zoomChanged
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
zoomChanged (win, bbox, autoCenter) {
|
zoomChanged (win, bbox, autoCenter) {
|
||||||
|
@ -865,6 +866,11 @@ class Editor extends EditorStartup {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.zoomDone()
|
this.zoomDone()
|
||||||
|
|
||||||
|
this.svgCanvas.runExtensions(
|
||||||
|
'zoomChanged',
|
||||||
|
/** @type {module:svgcanvas.SvgCanvas#event:ext_zoomChanged} */ this.svgCanvas.getZoom()
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue