1
1
Fork 0
mirror of https://github.com/zadam/trilium.git synced 2025-02-25 15:35:43 +08:00

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

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
package-lock.jsonpackage.json
src/public/app/widgets/type_widgets

635
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -36,7 +36,7 @@
"commonmark": "0.30.0",
"cookie-parser": "1.4.6",
"csurf": "1.11.0",
"dayjs": "1.11.3",
"dayjs": "1.11.4",
"dayjs-plugin-utc": "^0.1.2",
"ejs": "3.1.8",
"electron-debug": "3.2.0",
@ -71,7 +71,7 @@
"request": "2.88.2",
"rimraf": "3.0.2",
"sanitize-filename": "1.6.3",
"sanitize-html": "2.7.0",
"sanitize-html": "2.7.1",
"sax": "1.2.4",
"semver": "7.3.7",
"serve-favicon": "2.5.0",
@ -81,7 +81,7 @@
"tmp": "0.2.1",
"turndown": "7.1.1",
"unescape": "1.0.1",
"ws": "8.8.0",
"ws": "8.8.1",
"yauzl": "2.10.0"
},
"devDependencies": {
@ -89,10 +89,10 @@
"electron": "16.2.8",
"electron-builder": "23.1.0",
"electron-packager": "15.5.1",
"electron-rebuild": "3.2.7",
"electron-rebuild": "3.2.8",
"esm": "3.2.25",
"jasmine": "4.2.1",
"jsdoc": "3.6.10",
"jsdoc": "3.6.11",
"lorem-ipsum": "2.0.8",
"rcedit": "3.0.1",
"webpack": "5.73.0",

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');