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));
}
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)); }