Skip to content

Commit

Permalink
Merge branch 'master' into u/jisong/mergesegments
Browse files Browse the repository at this point in the history
  • Loading branch information
JiuqingSong authored Oct 25, 2024
2 parents c3397c7 + 09531d8 commit 47319e7
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions packages/roosterjs-editor-adapter/lib/editor/EditorAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1093,17 +1093,13 @@ export class EditorAdapter extends Editor implements ILegacyEditor {
*/
setZoomScale(scale: number): void {
if (scale > 0 && scale <= 10) {
const oldValue = this.getZoomScale();

if (oldValue != scale) {
this.triggerEvent(
'zoomChanged',
{
newZoomScale: scale,
},
true /*broadcast*/
);
}
this.triggerEvent(
'zoomChanged',
{
newZoomScale: scale,
},
true /*broadcast*/
);
}
}

Expand Down

0 comments on commit 47319e7

Please sign in to comment.