]> _ Git - fluidbook-toolbox.git/commitdiff
wait #7769 @13:00 corriger l'animation reveal, les animations simultanées, le placeme...
authorsoufiane <soufiane@cubedesigners.com>
Thu, 9 Oct 2025 16:07:15 +0000 (18:07 +0200)
committersoufiane <soufiane@cubedesigners.com>
Thu, 9 Oct 2025 16:07:15 +0000 (18:07 +0200)
resources/linkeditor/js/linkeditor.js
resources/linkeditor/js/linkeditor.links.js
resources/linkeditor/js/linkeditor.previewLinks.js
resources/linkeditor/js/linkeditor.resize.js
resources/linkeditor/style/inc/_links.sass

index e56a52f48b43af59d1b83a52b5479e1cdc210081..0c00442be2c119e4a53199a1601afecbae6feb4a 100644 (file)
@@ -509,6 +509,12 @@ LinkEditor.prototype = {
         this.loader.preloadPages();
         $("#linkeditor-layer-links").empty()
         this.previewLinks.setPreview();
+        const w = $("#linkeditor-layer-links").width()
+        const h = $("#linkeditor-layer-links").height()
+        $(".linkeditor-fluidbook-copy,#linkeditor-layer-links [class^=linkeditor-page-]").css({
+            width: w,
+            height: h
+        })
     },
 
     getCurrentPages: function (page) {
index 2b3bfedca0d054d1400d79818347508e61ae8479..18e33ad3a7e52ad17c125fc1d49fc8d6567420dd 100644 (file)
@@ -1593,9 +1593,9 @@ LinkeditorLinks.prototype = {
             if(links[link].type === '39') {
                 console.log(links[link])
                 if (links[link].to === "image") {
-                    previewDiv = $("#linkeditor-layer-links > [data-id-preview-wrap="+links[link].uid+"] .linkeditor-page-images")
+                    previewDiv = $("#linkeditor-layer-links > [data-id-preview-wrap="+links[link].uid+"] .wrapper_again_img")
                 } else if (links[link].to === "onlytext" || links[link].to === "text") {
-                    previewDiv = $("#linkeditor-layer-links > [data-id-preview-wrap="+links[link].uid+"] .linkeditor-page-texts")
+                    previewDiv = $("#linkeditor-layer-links > [data-id-preview-wrap="+links[link].uid+"] .wrapper_again_txt")
                 }else {
                     previewDiv = $("#linkeditor-layer-links > [data-id-preview-wrap="+links[link].uid+"] > [data-id-preview="+links[link].uid+"]")
                 }
index 01a992f9e1dd04944e566265c5aab182271082c0..182ee7050855a61bc9f21934682cc576144bd0ff 100644 (file)
@@ -23,10 +23,12 @@ LinkeditorPreviewLinks.prototype = {
         if($('#linkeditor-layer-links').length < 1) {
             $("#linkeditor-zoom").prepend('<div id="linkeditor-layer-links"></div>')
         }
+
+        this.linkeditor.links.updatePolygonLinks();
+
         for (let link in links) {
             this.updatePreview(links[link],isZooming,reset)
         }
-        this.linkeditor.links.updatePolygonLinks();
     },
 
     updatePreview: function(link, isZooming = false, reset = false) {
@@ -73,13 +75,17 @@ LinkeditorPreviewLinks.prototype = {
             <div data-id-preview="${id}"> <!-- utilisé pour l'animation en general -->
               <div class="preview"> <!-- utilisé pour l'animation sur des background-image -->
                     <div class="linkeditor-fluidbook-copy" data-id="${id}">
-                        <div class="linkeditor-page-images">
-                            <div class="linkeditor-page linkeditor-page-right-copy" data-page="1"></div>
-                            <div class="linkeditor-page linkeditor-page-left-copy" data-page="0"></div>
+                        <div class="wrapper_again_img">
+                            <div class="linkeditor-page-images">
+                                <div class="linkeditor-page linkeditor-page-right-copy" data-page="1"></div>
+                                <div class="linkeditor-page linkeditor-page-left-copy" data-page="0"></div>
+                            </div>
                         </div>
-                        <div class="linkeditor-page-texts">
-                            <div class="linkeditor-page linkeditor-page-right-copy" data-page="1"></div>
-                            <div class="linkeditor-page linkeditor-page-left-copy" data-page="0"></div>
+                        <div class="wrapper_again_txt">
+                            <div class="linkeditor-page-texts">
+                                <div class="linkeditor-page linkeditor-page-right-copy" data-page="1"></div>
+                                <div class="linkeditor-page linkeditor-page-left-copy" data-page="0"></div>
+                            </div>
                         </div>
                     </div>
                 </div>
@@ -167,13 +173,6 @@ LinkeditorPreviewLinks.prototype = {
         let animations = $this.linkeditor.links.resolveAnimation(animationText)
         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) {
             /**
@@ -191,6 +190,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())
@@ -199,19 +199,18 @@ LinkeditorPreviewLinks.prototype = {
         }
 
         if(polygon) {
-            $("#linkeditor-layer-links [data-id-preview-wrap="+$this.linkData.uid+"]").css({
-                'z-index': 3,
+            $("#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.getPolygon($this.linkData.left,$this.linkData.top,polygon)
             })
         }else{
             if(animZoom.length > 0) {
                 $("#linkeditor-layer-links [data-id-preview-wrap=" + $this.linkData.uid + "]").css({
-                    'clip-path': this.getClipPath(0, 0, $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({
+        $("#linkeditor-layer-links [data-id-preview="+$this.linkData.uid+"] [class^=wrapper_again_], #linkeditor-layer-links [data-id-preview-wrap="+$this.linkData.uid+"] .bg-preview").css({
             'clip-path': this.getClipPath(0,0,$this.linkData.width,$this.linkData.height)
         })
 
@@ -223,13 +222,18 @@ LinkeditorPreviewLinks.prototype = {
             'z-index': 2
         })
 
-        $("#linkeditor-layer-links [data-id-preview-wrap="+$this.linkData.uid+"]").css({
+        $("#linkeditor-layer-links [data-id-preview="+$this.linkData.uid+"], #linkeditor-layer-links [data-id-preview="+$this.linkData.uid+"] [class^=wrapper_again_]").css({
             width: $this.linkData.width,
             height: $this.linkData.height,
             top: $this.linkData.top,
             left: $this.linkData.left,
         })
 
+        $("#linkeditor-layer-links [data-id-preview="+$this.linkData.uid+"] .linkeditor-fluidbook-copy, #linkeditor-layer-links [data-id-preview="+$this.linkData.uid+"] [class^=linkeditor-page-]").css({
+            left: -$this.linkData.left,
+            top: -$this.linkData.top
+        })
+
         /**
          *
          * Application des styles pour #linkeditor-page-right-copy
index 32b8bdadc685a336e0b1e02e4d008c33c57bf6b9..c3eefca8c7a645d63f6ed4af3e6f5a243cdfffc4 100644 (file)
@@ -51,6 +51,11 @@ LinkeditorResize.prototype = {
             'top':top_,
             'transform':transform,
         })
+
+        $("#linkeditor-layer-links .linkeditor-fluidbook-copy, #linkeditor-layer-links [class^=linkeditor-page-]").css({
+            'width':width,
+            'height':height,
+        })
         //this.linkeditor.previewLinks.setPreview()
     },
 
@@ -86,7 +91,7 @@ LinkeditorResize.prototype = {
             fw *= 2;
         }
         $("#linkeditor-page-right").css({left: this.linkeditor.pw});
-        $("#linkeditor-fluidbook,#linkeditor-layer-links,.linkeditor-fluidbook-copy").css({width: fw, height: ph});
+        $("#linkeditor-fluidbook,#linkeditor-layer-links,.linkeditor-fluidbook-copy,#linkeditor-layer-links [class^=linkeditor-page-]").css({width: fw, height: ph});
     },
 
     resizeMain: function () {
index 7aa3aec98cd380b11032370734da3591d4b9d1e7..c2c17c91139c57da5b20fadcbacc8a62d0fd746a 100644 (file)
@@ -24,12 +24,11 @@ body:not(.preview)
 
 #linkeditor
     .linkeditor-page-texts,
-    .linkeditor-page-images
+    .linkeditor-page-images,
+    [class^=wrapper_again_]
         position: absolute
-        width: 100%
-        height: 100%
 
-    .linkeditor-page-texts
+    [class=wrapper_again_txt]
         z-index: 2
 
     .linkeditor-page-right-copy,