Skip to content

Commit 852dd44

Browse files
authored
make zooming with the editor buttons match live (microsoft#11092)
* make zooming with the editor buttons match live * increase monaco zoom rate with buttons
1 parent 9adc2e1 commit 852dd44

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎webapp/src/blocks.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,12 +1050,12 @@ export class Editor extends toolboxeditor.ToolboxEditor {
10501050

10511051
zoomIn() {
10521052
if (!this.editor) return;
1053-
this.editor.zoomCenter(0.8);
1053+
this.editor.zoomCenter(5);
10541054
}
10551055

10561056
zoomOut() {
10571057
if (!this.editor) return;
1058-
this.editor.zoomCenter(-0.8);
1058+
this.editor.zoomCenter(-5);
10591059
}
10601060

10611061
setScale(scale: number) {

‎webapp/src/monaco.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1283,7 +1283,7 @@ export class Editor extends toolboxeditor.ToolboxEditor {
12831283
if (!this.editor) return;
12841284
if (this.parent.settings.editorFontSize >= MAX_EDITOR_FONT_SIZE) return;
12851285
let currentFont = this.getEditorFontSize();
1286-
this.parent.settings.editorFontSize = currentFont + 1;
1286+
this.parent.settings.editorFontSize = currentFont + 3;
12871287
this.editor.updateOptions({ fontSize: this.parent.settings.editorFontSize });
12881288
this.forceDiagnosticsUpdate();
12891289
}
@@ -1292,7 +1292,7 @@ export class Editor extends toolboxeditor.ToolboxEditor {
12921292
if (!this.editor) return;
12931293
if (this.parent.settings.editorFontSize <= MIN_EDITOR_FONT_SIZE) return;
12941294
let currentFont = this.getEditorFontSize();
1295-
this.parent.settings.editorFontSize = currentFont - 1;
1295+
this.parent.settings.editorFontSize = currentFont - 3;
12961296
this.editor.updateOptions({ fontSize: this.parent.settings.editorFontSize });
12971297
this.forceDiagnosticsUpdate();
12981298
}

0 commit comments

Comments
 (0)