prevent zooming the whole app when ctrl + zoom on the canvas note, fixes #3002

This commit is contained in:
zadam
2022-07-20 23:39:40 +02:00
parent 1afa32502f
commit bed0db9fa0
3 changed files with 368 additions and 284 deletions

View File

@@ -114,6 +114,13 @@ export default class ExcalidrawTypeWidget extends TypeWidget {
doRender() {
this.$widget = $(TPL);
this.$widget.bind('mousewheel DOMMouseScroll', event => {
if (event.ctrlKey) {
event.preventDefault();
event.stopPropagation();
return false;
}
});
this.$widget.toggleClass("full-height", true); // only add
this.$render = this.$widget.find('.canvas-render');