From 637b615a9649402c5dbfd9cc9aca143d98155b2a Mon Sep 17 00:00:00 2001 From: soufiane Date: Thu, 30 Jan 2025 11:14:21 +0100 Subject: [PATCH] wait #7275 @6:00 --- resources/linkeditor/js/linkeditor.links.js | 1 + resources/linkeditor/js/linkeditor.previewLinks.js | 2 +- resources/linkeditor/js/linkeditor.undo.js | 2 -- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/resources/linkeditor/js/linkeditor.links.js b/resources/linkeditor/js/linkeditor.links.js index e0b963dd3..93ed768fe 100644 --- a/resources/linkeditor/js/linkeditor.links.js +++ b/resources/linkeditor/js/linkeditor.links.js @@ -1294,6 +1294,7 @@ LinkeditorLinks.prototype = { $this.addLink(link, false); LINKS[link.uid] = link; existingUIDs.push(link.uid); + $this.linkeditor.previewLinks.updatePreview(link) }); // Search for missing links and delete them var pages = this.linkeditor.getCurrentPages(); diff --git a/resources/linkeditor/js/linkeditor.previewLinks.js b/resources/linkeditor/js/linkeditor.previewLinks.js index 180d1cf1e..8003366c7 100644 --- a/resources/linkeditor/js/linkeditor.previewLinks.js +++ b/resources/linkeditor/js/linkeditor.previewLinks.js @@ -168,7 +168,6 @@ LinkeditorPreviewLinks.prototype = { * */ this.createPreviewLayerHTML($("#linkeditor-layer-links"),$this.linkData.uid) - this.setTransformOrigin($this.linkData) /*if (animZoom.length > 0) { $("#linkeditor-layer-links [data-id-preview=" + $this.linkData.uid + "] .preview").addClass("img") @@ -220,6 +219,7 @@ LinkeditorPreviewLinks.prototype = { $("#linkeditor-layer-links [data-id-preview=" + $this.linkData.uid + "] .preview").removeClass("img") /*}*/ } + this.setTransformOrigin($this.linkData) const z = this.linkeditor.zoom.normalizeZoom(this.linkeditor.zoom.getZoom()) if(z) { diff --git a/resources/linkeditor/js/linkeditor.undo.js b/resources/linkeditor/js/linkeditor.undo.js index c59b1b371..bbbbf24e1 100644 --- a/resources/linkeditor/js/linkeditor.undo.js +++ b/resources/linkeditor/js/linkeditor.undo.js @@ -104,7 +104,6 @@ LinkeditorUndo.prototype = { //console.log('undo : current index', index, 'states length', this.states[this.linkeditor.getCurrentPage()].length); this.updateIconsStates(); - this.linkeditor.links.setPreview(); }, redo: function () { @@ -124,7 +123,6 @@ LinkeditorUndo.prototype = { //console.log('redo : current index', index, 'states length', this.states[this.linkeditor.getCurrentPage()].length); this.updateIconsStates(); - this.linkeditor.links.setPreview(); } } -- 2.39.5