From: soufiane Date: Thu, 9 Oct 2025 16:07:15 +0000 (+0200) Subject: wait #7769 @13:00 corriger l'animation reveal, les animations simultanées, le placeme... X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=e4e4d869061b9f3bf27cb322beabc66b07d52c04;p=fluidbook-toolbox.git wait #7769 @13:00 corriger l'animation reveal, les animations simultanées, le placement des animations de types calques --- diff --git a/resources/linkeditor/js/linkeditor.js b/resources/linkeditor/js/linkeditor.js index e56a52f48..0c00442be 100644 --- a/resources/linkeditor/js/linkeditor.js +++ b/resources/linkeditor/js/linkeditor.js @@ -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) { diff --git a/resources/linkeditor/js/linkeditor.links.js b/resources/linkeditor/js/linkeditor.links.js index 2b3bfedca..18e33ad3a 100644 --- a/resources/linkeditor/js/linkeditor.links.js +++ b/resources/linkeditor/js/linkeditor.links.js @@ -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+"]") } diff --git a/resources/linkeditor/js/linkeditor.previewLinks.js b/resources/linkeditor/js/linkeditor.previewLinks.js index 01a992f9e..182ee7050 100644 --- a/resources/linkeditor/js/linkeditor.previewLinks.js +++ b/resources/linkeditor/js/linkeditor.previewLinks.js @@ -23,10 +23,12 @@ LinkeditorPreviewLinks.prototype = { if($('#linkeditor-layer-links').length < 1) { $("#linkeditor-zoom").prepend('') } + + 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 = {
-
-
-
+
+
+
+
+
-
-
-
+
+
+
+
+
@@ -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 diff --git a/resources/linkeditor/js/linkeditor.resize.js b/resources/linkeditor/js/linkeditor.resize.js index 32b8bdadc..c3eefca8c 100644 --- a/resources/linkeditor/js/linkeditor.resize.js +++ b/resources/linkeditor/js/linkeditor.resize.js @@ -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 () { diff --git a/resources/linkeditor/style/inc/_links.sass b/resources/linkeditor/style/inc/_links.sass index 7aa3aec98..c2c17c911 100644 --- a/resources/linkeditor/style/inc/_links.sass +++ b/resources/linkeditor/style/inc/_links.sass @@ -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,