]> _ Git - fluidbook-html5.git/commitdiff
wip #4508 @1.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 17 Feb 2022 19:01:35 +0000 (20:01 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 17 Feb 2022 19:01:35 +0000 (20:01 +0100)
js/libs/fluidbook/fluidbook.links.js
style/fluidbook.less

index a2e5807221476116f24953c7d94aaf448d886ab6..170181f9a2fcc08dfa35d2af9e04162367ff94bc 100644 (file)
@@ -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;
         }
index 0ae0a27d3472dd413ba08cb7fed35f832fbe00e1..86e72fcce3dbff1d86ba39634d72efcd69edfc82 100644 (file)
@@ -1445,6 +1445,10 @@ html.ios body.portrait #interface {
   position: absolute;
   pointer-events: none;
 
+  &.interactive{
+    pointer-events: auto;
+  }
+
   &.textLink {
     white-space: nowrap;