]> _ Git - fluidbook-toolbox.git/commitdiff
wip #6961
authorsoufiane <soufiane@cubedesigners.com>
Mon, 12 Aug 2024 13:36:39 +0000 (15:36 +0200)
committersoufiane <soufiane@cubedesigners.com>
Mon, 12 Aug 2024 13:36:39 +0000 (15:36 +0200)
resources/linkeditor/js/linkeditor.links.js
resources/linkeditor/style/inc/_links.sass

index 4ba9a74263d8cfab4e45454cc05c34200d55dac4..1ef764ca9ed5469bea60dcba016d224d8348d174 100644 (file)
@@ -1767,12 +1767,10 @@ LinkeditorLinks.prototype = {
             let animWithBackground = animations.filter((v) => v.backgroundColor)
             let backgroundColor = animWithBackground.length > 0 ? animWithBackground[0].backgroundColor : null
 
-            console.log($link.find('.bg-preview'))
-
             $link.find('.bg-preview').css('background-color',backgroundColor)
-            /*if(links[link].type === '15' || /\.(jpg|png|svg|webp|avif)$/.exec(links[link].image)) {
-                el = previewDiv.children().get(0)
-            }*/
+            if(links[link].type === '39') {
+                previewDiv.addClass(links[link].to)
+            }
 
             this.linkeditor.linksAnimations.executeAnimations(el, animations)
         }
index c6a5c7e1fd7aa8da597b79ad77bcd6b87f106a73..317f087502d5a0eab10be5e8b9d120b6ae66c0d9 100644 (file)
         [data-id-preview]:not(.link-text)
             overflow: hidden
 
+        [data-id-preview]
+            &.onlytext,&.text
+                .images
+                    display: none
+                .texts
+                    display: initial
+            &.image
+                .images
+                    display: initial
+                .texts
+                    display: none
+            &.both
+                .images,.texts
+                    display: initial
+
+
+
+
         #linkeditor-main.dropfile &.dropfile
             border-style: dashed