Added mouse scroll zoom
This commit is contained in:
parent
d6f766753c
commit
a4d602f98a
@ -182,6 +182,19 @@ export class CodeViewComponent extends CodeViewBase {
|
||||
}
|
||||
});
|
||||
|
||||
this.editor.on("mousewheel", (event) => {
|
||||
if (event.domEvent.ctrlKey && event.domEvent.deltaY < 0) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
this.zoomIn();
|
||||
}
|
||||
else if (event.domEvent.ctrlKey && event.domEvent.deltaY > 0) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
this.zoomOut();
|
||||
}
|
||||
});
|
||||
|
||||
this.editor.on("change", () => {
|
||||
if (this.debounceId) { clearTimeout(this.debounceId); }
|
||||
this.setDebounceTimeout();
|
||||
|
Loading…
Reference in New Issue
Block a user