开发者

BBC Glow Sortable: custom animation

I have implemented bbc glow sortable on my site. So, you can drag and drop items on the dashboard....like the bbc site! :) Just wondering, does anyone know how I can customise the animation?

Currently when I click the item I can m开发者_如何学运维ove it to another section and drop it. This fires an animation. I'm looking for a quick movement without the animation.

Cheers


You need to override the draggable option onAfterDrop as per their documentation

"The default action is to animate the draggable back to it's start position. This can be cancelled by returning false from the listener or calling {@link glow.events.Event.preventDefault} on the {@link glow.events.Event} param."

new glow.widgets.Sortable(
    '#cols-example .col1, #cols-example .col2, #cols-example .col3',
    {
        draggableOptions : {
            handle : 'strong',
            onAfterDrop: function() {}

        }
    }
);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜