From c0bbeae43c9f0fb5391c3454ba70916eb25dc7a5 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Mon, 29 Jul 2024 20:32:04 +0200 Subject: [PATCH] wip #6961 @0.5 --- resources/linkeditor/js/linkeditor.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/resources/linkeditor/js/linkeditor.js b/resources/linkeditor/js/linkeditor.js index c52cdd431..8cb410112 100644 --- a/resources/linkeditor/js/linkeditor.js +++ b/resources/linkeditor/js/linkeditor.js @@ -24,6 +24,7 @@ import LinkeditorLayers from "./linkeditor.layers"; import LinkeditorUndo from './linkeditor.undo'; import LinkeditorClipboard from './linkeditor.clipboard'; import LinkeditorAccessControl from './linkeditor.accessControl'; +import FluidbookLinksAnimations from "./fluidbook.links.animations"; window.$ = window.jQuery = require('jquery'); window.key = require('keymaster-reloaded'); @@ -36,7 +37,7 @@ window.key.filter = function (event) { }; function keyfilter(event, disable = false) { - if(disable) { + if (disable) { return false } let tagName = (event.target || event.srcElement).tagName; @@ -120,6 +121,7 @@ LinkEditor.prototype = { this.undo = new LinkeditorUndo(this); this.accessControl = new LinkeditorAccessControl(this); this.previewLinks = new LinkeditorPreviewLinks(this); + this.linksAnimations = new FluidbookLinksAnimations(false); this.initEvents(); this.initIcons(); @@ -202,7 +204,7 @@ LinkEditor.prototype = { } else if (e.keyCode == 18) { $("#linkeditor-main").addClass('duplicate'); - } else if (e.key == '>' || e.keyCode === 60 || e.keyCode === 226 || e.key==='<' || e.keyCode===188) { + } else if (e.key == '>' || e.keyCode === 60 || e.keyCode === 226 || e.key === '<' || e.keyCode === 188) { $("#linkeditor-main").addClass('polygon'); } $this.rulers.moveRuler(); @@ -216,7 +218,7 @@ LinkEditor.prototype = { $this.zoom.resetZoomDrag(); } else if (e.keyCode == 18) { $("#linkeditor-main").removeClass('duplicate'); - } else if (e.key == '>' || e.keyCode === 60 || e.keyCode === 226 || e.key==='<' || e.keyCode===188) { + } else if (e.key == '>' || e.keyCode === 60 || e.keyCode === 226 || e.key === '<' || e.keyCode === 188) { $("#linkeditor-main").removeClass('polygon'); $this.links.closePolygonShape(); } @@ -377,8 +379,8 @@ LinkEditor.prototype = { let v = parseFloat($(e).attr('fb-' + dim)); if (dim === 'width' || dim === 'height') { css[dim] = (v * ($this.fs * $this.zoom.zoom)) + 1; - if(dim === 'height') { - if(LINKS[$(e).attr('fb-uid')].type === '35') { + if (dim === 'height') { + if (LINKS[$(e).attr('fb-uid')].type === '35') { $this.links.setFontSize(LINKS[$(e).attr('fb-uid')]) } } @@ -494,7 +496,7 @@ LinkEditor.prototype = { } this.undo.updateIconsStates(); this.loader.preloadPages(); - if($("#preview-links").hasClass("active")) { + if ($("#preview-links").hasClass("active")) { this.links.setPreview() } }, -- 2.39.5