From 2c060d59303e604d704b88f62c490a082ff775df Mon Sep 17 00:00:00 2001 From: soufiane Date: Tue, 19 Mar 2024 12:00:57 +0100 Subject: [PATCH] wait #6787 @1:30 --- resources/linkeditor/js/linkeditor.links.js | 47 +++++++++++++++------ 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/resources/linkeditor/js/linkeditor.links.js b/resources/linkeditor/js/linkeditor.links.js index 0b4ece134..0bbb95193 100644 --- a/resources/linkeditor/js/linkeditor.links.js +++ b/resources/linkeditor/js/linkeditor.links.js @@ -1566,10 +1566,15 @@ LinkeditorLinks.prototype = { l = this.getLinkById(linkData.uid), gsapConfig = this.convertAnimationStringToObject(linkData.image_rollover) + l.html("
") + + $("[data-id-preview="+linkData.uid+"]").css({ + height: '100%', + width: '100%' + }) + if(linkData.type === '14') { - l.html("
") $("[data-id-preview="+linkData.uid+"]").css({ - height: '100%', backgroundColor: linkData.to, 'z-index': 99 }) @@ -1577,6 +1582,18 @@ LinkeditorLinks.prototype = { /*gsapConfig.forEach(function(conf) { gsap.to($("[data-id-preview="+linkData.uid+"]"),conf) })*/ + } else if(linkData.type === '15') { + let imgUrl = ASSETS['uid_'+linkData.uid]['url'] + let img = "" + $("[data-id-preview="+linkData.uid+"]").append(img) + + $("[data-id-preview="+linkData.uid+"] img").css({ + height: '100%', + width: '100%', + display: 'block', + 'background-size': '100% 100%', + 'background-position': '0 0', + }) } } }, @@ -1589,19 +1606,21 @@ LinkeditorLinks.prototype = { let anims = anim.split('---') let o = [] - anims.forEach(function(anim_){ - let arr = anim_.split('\n') - let o_ = {} - arr.forEach(function(pair) { - let parts = pair.split("="); - if(parts[0].length > 0 && parts[1].length > 0) { - let k = parts[0]; - let v = parts[1]; - o_[k] = v; - } + if(anim !== "" && anim !== "none") { + anims.forEach(function (anim_) { + let arr = anim_.split('\n') + let o_ = {} + arr.forEach(function (pair) { + let parts = pair.split("="); + if (parts[0].length > 0 && parts[1].length > 0) { + let k = parts[0]; + let v = parts[1]; + o_[k] = v; + } + }) + o.push(o_) }) - o.push(o_) - }) + } return o }, -- 2.39.5