From 95b8931183eef8193248ae1c289744b43c63e7a7 Mon Sep 17 00:00:00 2001 From: soufiane Date: Wed, 29 Jan 2025 15:00:42 +0100 Subject: [PATCH] wait #7274 @0:30 --- .../linkeditor/js/linkeditor.previewLinks.js | 26 ------------------- resources/linkeditor/js/linkeditor.resize.js | 20 +++++++++++--- .../link_editor.blade.php | 6 ----- 3 files changed, 16 insertions(+), 36 deletions(-) diff --git a/resources/linkeditor/js/linkeditor.previewLinks.js b/resources/linkeditor/js/linkeditor.previewLinks.js index cc7f75682..180d1cf1e 100644 --- a/resources/linkeditor/js/linkeditor.previewLinks.js +++ b/resources/linkeditor/js/linkeditor.previewLinks.js @@ -36,7 +36,6 @@ LinkeditorPreviewLinks.prototype = { if ($('[data-id-preview="' + link.uid + '"]').length < 1) { l.html("
") - //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, diff --git a/resources/linkeditor/js/linkeditor.resize.js b/resources/linkeditor/js/linkeditor.resize.js index 7607b5381..32b8bdadc 100644 --- a/resources/linkeditor/js/linkeditor.resize.js +++ b/resources/linkeditor/js/linkeditor.resize.js @@ -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; diff --git a/resources/views/fluidbook_publication/link_editor.blade.php b/resources/views/fluidbook_publication/link_editor.blade.php index f672a23c6..0a22be904 100644 --- a/resources/views/fluidbook_publication/link_editor.blade.php +++ b/resources/views/fluidbook_publication/link_editor.blade.php @@ -308,10 +308,6 @@ @endif - - @@ -405,8 +401,6 @@ var ASSETS = @json($assets); var CAN_CONTAIN_LINKS = @json($canContainLinks); var DEPTH = @json($depths); - var FONT_SIZE = @json([]); - var ZOOM = null; -- 2.39.5