]> _ Git - fluidbook-toolbox.git/commitdiff
wait #7274 @0:30
authorsoufiane <soufiane@cubedesigners.com>
Wed, 29 Jan 2025 14:00:42 +0000 (15:00 +0100)
committersoufiane <soufiane@cubedesigners.com>
Wed, 29 Jan 2025 14:00:42 +0000 (15:00 +0100)
resources/linkeditor/js/linkeditor.previewLinks.js
resources/linkeditor/js/linkeditor.resize.js
resources/views/fluidbook_publication/link_editor.blade.php

index cc7f7568275a42f3c1561f9ddf9479b20e63a80b..180d1cf1e703a86f3d96c0b5a69cc684dca24df2 100644 (file)
@@ -36,7 +36,6 @@ LinkeditorPreviewLinks.prototype = {
 
         if ($('[data-id-preview="' + link.uid + '"]').length < 1) {
             l.html("<div class='bg-preview'></div><div data-id-preview-wrap='" + link.uid + "'><div data-id-preview='" + link.uid + "'></div></div>")
-            //this.setTransformOrigin(link.uid)
         }
 
         $this.previewByType(link.type, isZooming, reset)
@@ -227,31 +226,6 @@ LinkeditorPreviewLinks.prototype = {
             this.linkeditor.zoom.setZoom(z)
         }
 
-        /**
-         *
-         * (Voir linkeditor.resize.js resizePages())
-         *
-         * Application des styles pour #linkeditor-fluidbook-copy
-         */
-        let width = $("#linkeditor-fluidbook").css("width")
-        let height = $("#linkeditor-fluidbook").css("height")
-        let transform = $("#linkeditor-fluidbook").css("transform")
-        let left_ = $("#linkeditor-fluidbook").css("left")
-        let top_ = $("#linkeditor-fluidbook").css("top")
-
-        $("#linkeditor-layer-links").css({
-            'width':width,
-            'height':height,
-            'left':left_,
-            'top':top_,
-            'transform':transform,
-        })
-
-        $(".linkeditor-fluidbook-copy[data-id="+$this.linkData.uid+"]").css({
-            'width':width,
-            'height':height
-        })
-
         if(polygon) {
             $("#linkeditor-layer-links [data-id-preview-wrap="+$this.linkData.uid+"]").css({
                 'z-index': 3,
index 7607b5381bcda9bd9fbbc3e57fcf496373cf5710..32b8bdadc685a336e0b1e02e4d008c33c57bf6b9 100644 (file)
@@ -18,7 +18,6 @@ LinkeditorResize.prototype = {
     updateWindowDimensions: function () {
         this.ww = $(window).outerWidth();
         this.hh = $(window).outerHeight();
-
     },
 
     resize: function () {
@@ -39,6 +38,20 @@ LinkeditorResize.prototype = {
         if (this.linkeditor.popup) {
             this.linkeditor.popup.resize();
         }
+        let width = $("#linkeditor-fluidbook").css("width")
+        let height = $("#linkeditor-fluidbook").css("height")
+        let transform = $("#linkeditor-fluidbook").css("transform")
+        let left_ = $("#linkeditor-fluidbook").css("left")
+        let top_ = $("#linkeditor-fluidbook").css("top")
+
+        $("#linkeditor-layer-links").css({
+            'width':width,
+            'height':height,
+            'left':left_,
+            'top':top_,
+            'transform':transform,
+        })
+        //this.linkeditor.previewLinks.setPreview()
     },
 
     resizePages: function () {
@@ -73,8 +86,7 @@ LinkeditorResize.prototype = {
             fw *= 2;
         }
         $("#linkeditor-page-right").css({left: this.linkeditor.pw});
-        $("#linkeditor-fluidbook").css({width: fw, height: ph});
-        this.linkeditor.previewLinks.setPreview(true)
+        $("#linkeditor-fluidbook,#linkeditor-layer-links,.linkeditor-fluidbook-copy").css({width: fw, height: ph});
     },
 
     resizeMain: function () {
@@ -109,7 +121,7 @@ LinkeditorResize.prototype = {
             left = (this.linkeditor.canvasRect.width - this.linkeditor.fw * this.linkeditor.fs) / 2;
             top = 75;
         }
-        $("#linkeditor-fluidbook").css({left: left, top: top, transform: 'scale(' + this.linkeditor.fs + ')'});
+        $("#linkeditor-fluidbook,#linkeditor-layer-links").css({left: left, top: top, transform: 'scale(' + this.linkeditor.fs + ')'});
     },
 };
 export default LinkeditorResize;
index f672a23c607c9e13b847e23835e6a93123d42dd0..0a22be904917ebade0c8ba5a31d76b599003103c 100644 (file)
                     @endif
                     <a href="#" data-action="toggleWhiteOverlay" data-icon="white-overlay"
                        data-tooltip="{{__('Afficher un overlay blanc semi-opaque au dessus des pages')}}"></a>
-                    <a href="#" id="preview-links" class="disabled" data-action="links.preview" data-icon="preview-links"
-                       data-tooltip="{{__('Voir un aperçu des liens (Ctrl+Y)')}}" data-key="ctrl+y"></a>
-                    <a href="#" id="start-animations" class="" data-action="links.animation" data-icon="start-animation"
-                       data-tooltip="{{__('Lancer les animations')}}"></a>
                     <a href="#" data-action="openFluidbook" data-icon="open-fluidbook"
                        data-tooltip="{{__('Ouvrir le fluidbook à la page courante')}}"></a>
 
         var ASSETS = @json($assets);
         var CAN_CONTAIN_LINKS = @json($canContainLinks);
         var DEPTH = @json($depths);
-        var FONT_SIZE = @json([]);
-        var ZOOM = null;
     </script>
     <script
         src="/packages/linkeditor/js/linkeditor.js?v={{filemtime(public_path('packages/linkeditor/js/linkeditor.js'))}}"></script>