Closed galinaskaya closed 5 years ago
Take a look at the code for this example that uses callbacks. You have to invoke the callback(item)
if you want the item's movement to succeed; otherwise, by leaving out that callback (like your jsbin does), or by invoking callback(null)
, you're telling the Timeline to cancel those user actions (prevent the item's movement).
I'm working on a project that uses the
onMove
callback function. Recently I was investigating a way to add a dynamic timestamp on each item (that updates as the item is moved around on the timeline, before it's dropped) and tried using theonMoving
function for that. However, when I added that function to the code, I noticed that the items on the timeline were no longer visually moving. There is no way to "pick up" the item and start moving it.Interestingly enough, both the
onMove
and theonMoving
functions are still firing; however, visually the item does not move on the timeline. This also seems to happen when onlyonMoving
is used.Made a simple JS Bin to illustrate the issue here: JS Bin
Tried Chrome, Safari, and Firefox on macOS High Sierra.