From: Vincent Vanwaelscappel Date: Thu, 17 Feb 2022 19:01:35 +0000 (+0100) Subject: wip #4508 @1.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=1d8ce7c332b0abfba90d89f9fafe9b4608789a08;p=fluidbook-html5.git wip #4508 @1.5 --- diff --git a/js/libs/fluidbook/fluidbook.links.js b/js/libs/fluidbook/fluidbook.links.js index a2e58072..170181f9 100644 --- a/js/libs/fluidbook/fluidbook.links.js +++ b/js/libs/fluidbook/fluidbook.links.js @@ -792,6 +792,28 @@ FluidbookLinks.prototype = { link.css('opacity', 1); countup.start(); }, to.delay * 1000); + } else if (animation.type === 'draggable') { + $(link).css('pointer-events', 'auto'); + var draggable = new Draggable(link, { + type: 'x', + onRelease: function () { + var d = this; + if (animation.drop === 'click') { + $('#links .link a').each(function () { + if (d.hitTest(this)) { + var e = this; + setTimeout(function () { + $(e).click(); + }, 500); + + TweenLite.to($(link), 0.5, {x: 0, y: 0}); + return true; + } + }); + } + + } + }); } else { tweenmax = false; } diff --git a/style/fluidbook.less b/style/fluidbook.less index 0ae0a27d..86e72fcc 100644 --- a/style/fluidbook.less +++ b/style/fluidbook.less @@ -1445,6 +1445,10 @@ html.ios body.portrait #interface { position: absolute; pointer-events: none; + &.interactive{ + pointer-events: auto; + } + &.textLink { white-space: nowrap;