]> _ Git - fluidbook-html5.git/commitdiff
wip #4508 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 22 Feb 2022 10:59:45 +0000 (11:59 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 22 Feb 2022 10:59:45 +0000 (11:59 +0100)
js/libs/fluidbook/fluidbook.links.js

index 1110d2f2111aea111d3a0e734a59e1bbb24c5a0a..4b4610c33c8711bf32645a8f9daa5f851f65608e 100644 (file)
@@ -791,9 +791,10 @@ FluidbookLinks.prototype = {
         } else if (animation.type === 'draggable') {
             $(link).css('pointer-events', 'auto');
             var draggable = new Draggable(link, {
+                inertia: true,
                 type: 'x', onRelease: function () {
                     var d = this;
-                    if (animation.drop === 'click') {
+                    if (animation.drop === 'clickhide') {
                         $('#links .link a').each(function () {
                             if (d.hitTest(this)) {
                                 var e = this;
@@ -801,12 +802,11 @@ FluidbookLinks.prototype = {
                                     $(e).click();
                                 }, 500);
 
-                                gsap.to($(link), {duration: 0.5, x: 0, y: 0});
+                                gsap.to($(link), {duration: 0.5, autoAlpha: 0});
                                 return true;
                             }
                         });
                     }
-
                 }
             });
         } else {