From: soufiane Date: Fri, 3 Oct 2025 16:09:14 +0000 (+0200) Subject: wip #7766 @10:00 corriger l'animation sur des liens de type calque X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=4eb7df887032f72914bd57e2928ced0795a9f83e;p=fluidbook-toolbox.git wip #7766 @10:00 corriger l'animation sur des liens de type calque --- diff --git a/resources/linkeditor/js/linkeditor.links.js b/resources/linkeditor/js/linkeditor.links.js index 93ed768fe..fa22c8e81 100644 --- a/resources/linkeditor/js/linkeditor.links.js +++ b/resources/linkeditor/js/linkeditor.links.js @@ -1601,7 +1601,7 @@ LinkeditorLinks.prototype = { /** * On supprime les svgs s'il y en a - * utile dans le cas si c'est une animation pie + * utile dans le cas où c'est une animation pie */ previewDiv.find('svg').remove() diff --git a/resources/linkeditor/js/linkeditor.previewLinks.js b/resources/linkeditor/js/linkeditor.previewLinks.js index 8003366c7..97b36dc1b 100644 --- a/resources/linkeditor/js/linkeditor.previewLinks.js +++ b/resources/linkeditor/js/linkeditor.previewLinks.js @@ -162,12 +162,19 @@ LinkeditorPreviewLinks.prototype = { let animZoom = animations.filter((v) => v.type === "zoomout" || v.type === "zoomin") let polygon = $link.attr("fb-polygon") var previewDiv = $("[data-id-preview=" + $this.linkData.uid + "]") + var previewWrapDiv = $("[data-id-preview=" + $this.linkData.uid + "]") + $(".linkeditor-fluidbook-copy").css({ + left: -$this.linkData.left, + top: -$this.linkData.top + }) + if(!isZooming) { /** * */ this.createPreviewLayerHTML($("#linkeditor-layer-links"),$this.linkData.uid) + /*if (animZoom.length > 0) { $("#linkeditor-layer-links [data-id-preview=" + $this.linkData.uid + "] .preview").addClass("img") @@ -234,23 +241,30 @@ LinkeditorPreviewLinks.prototype = { }else{ if(animZoom.length > 0) { $("#linkeditor-layer-links [data-id-preview-wrap=" + $this.linkData.uid + "]").css({ - 'clip-path': this.getClipPath($this.linkData.left, $this.linkData.top, $this.linkData.width, $this.linkData.height) + 'clip-path': this.getClipPath(0, 0, $this.linkData.width, $this.linkData.height) }) } } $("#linkeditor-layer-links [data-id-preview="+$this.linkData.uid+"], #linkeditor-layer-links [data-id-preview-wrap="+$this.linkData.uid+"] .bg-preview").css({ - 'clip-path': this.getClipPath($this.linkData.left,$this.linkData.top,$this.linkData.width,$this.linkData.height) + 'clip-path': this.getClipPath(0,0,$this.linkData.width,$this.linkData.height) }) $("#linkeditor-layer-links .bg-preview").css({ - 'width':'100%', - 'height':'100%', + 'width': "100%", + 'height': "100%", 'position': 'absolute', 'background-color': '#fff', 'z-index': 2 }) + $("#linkeditor-layer-links [data-id-preview-wrap="+$this.linkData.uid+"]").css({ + width: $this.linkData.width, + height: $this.linkData.height, + top: $this.linkData.top, + left: $this.linkData.left, + }) + /** * * Application des styles pour #linkeditor-page-right-copy