You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want drop an item with:
start time : same I get when I do:
timeline.on('drop', function (properties) {
console.log('time at this point: '+properties.time);
});
end time : start time + something (no problem here)
function handleDragStart(event) {
var dragSrcEl = event.target;
event.dataTransfer.effectAllowed = 'move';
var item = {
id: new Date(),
type: 'range',
content: event.target.innerHTML.trim()
};
item.start = WHAT CAN I USE HERE?
item.end = new Date(10006060 + (new Date()).valueOf());
event.dataTransfer.setData("text", JSON.stringify(item));
}
The text was updated successfully, but these errors were encountered:
Hello.
(sorry if I explain myself wrong)
I´m using this example:
https://visjs.github.io/vis-timeline/examples/timeline/other/drag_drop.html
In this code:
https://pastebin.com/Pg0JRsfG
I want drop an item with:
start time : same I get when I do:
timeline.on('drop', function (properties) {
console.log('time at this point: '+properties.time);
});
end time : start time + something (no problem here)
function handleDragStart(event) {
var dragSrcEl = event.target;
event.dataTransfer.effectAllowed = 'move';
var item = {
id: new Date(),
type: 'range',
content: event.target.innerHTML.trim()
};
item.start = WHAT CAN I USE HERE?
item.end = new Date(10006060 + (new Date()).valueOf());
event.dataTransfer.setData("text", JSON.stringify(item));
}
The text was updated successfully, but these errors were encountered: