]> _ Git - fluidbook-toolbox.git/commitdiff
wip #7766 @10:00 corriger l'animation sur des liens de type calque
authorsoufiane <soufiane@cubedesigners.com>
Fri, 3 Oct 2025 16:09:14 +0000 (18:09 +0200)
committersoufiane <soufiane@cubedesigners.com>
Fri, 3 Oct 2025 16:09:14 +0000 (18:09 +0200)
resources/linkeditor/js/linkeditor.links.js
resources/linkeditor/js/linkeditor.previewLinks.js

index 93ed768fef0cbc7a183f2307864b6ba21f966102..fa22c8e81395aceb485c5e8bc614804689d8c00f 100644 (file)
@@ -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  c'est une animation pie
              */
             previewDiv.find('svg').remove()
 
index 8003366c7360293ab5ec834bc8ec63b13f5acbf2..97b36dc1b1fa16a40b7a9919d087146bfad0de58 100644 (file)
@@ -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