Hello! I have a little problem with Draggable Plugin and the snap option.
draggable = Draggable.create(__that.$slideshow, {type:"x", edgeResistance:.5, throwProps:true, lockAxis : true, bounds:__that.$bounds
, snap: {
x: function(_x) {
var
newX = (_x / __that.totalFlowWidth) * __that.totalFlowWidth;
return newX;
},
}
});
In the above example, totalFlowWidth represents the total width of my container.
The problem is that the value are correct but the snap tween is not launched in the return.
When i put a number instead of variable newX, it works. When i switch to newX (which return a number value), nothing happens.
It's very weird.
Need some help.
Thx