]> _ Git - fluidbook-toolbox.git/commitdiff
wait #7812 @5:30
authorsoufiane <soufiane@cubedesigners.com>
Tue, 24 Mar 2026 17:20:40 +0000 (18:20 +0100)
committersoufiane <soufiane@cubedesigners.com>
Tue, 24 Mar 2026 17:20:40 +0000 (18:20 +0100)
resources/linkeditor/js/linkeditor.previewLinks.js

index 8003366c7360293ab5ec834bc8ec63b13f5acbf2..3d4a4d3464e6721c1b1494dca0248af01541e09e 100644 (file)
@@ -104,15 +104,16 @@ LinkeditorPreviewLinks.prototype = {
     },
 
     previewImage: function($this) {
-        let imgUrl = "/fluidbook-publication/" + FLUIDBOOK_DATA.id + "/edit/links/assets/" + this.linkData.image
+        let imgUrl = "/fluidbook-publication/" + FLUIDBOOK_DATA.id + "/edit/links/assets/" + this.linkData.to
         let previewDiv = $("[data-id-preview=" + $this.linkData.uid + "]")
 
-        if(ASSETS['uid_' + this.linkData.uid]['url'] !== undefined) {
-            imgUrl = ASSETS['uid_' + this.linkData.uid]['url']
+        if (ASSETS['uid_' + $this.linkData.uid] !== undefined) {
+            imgUrl = ASSETS['uid_' + $this.linkData.uid]['url'];
         }
+
         imgUrl = imgUrl + (imgUrl.includes('.svg') ? "#svgView(preserveAspectRatio(none))" : '')
         let img = "<img src='" + imgUrl + "' />"
-        previewDiv.css("position","absolute").html(img)
+        previewDiv.css("position", "absolute").html(img)
     },
 
     previewText: function($this) {