Our pure JavaScript Scheduler component


Post by frederick45 »

hi, my code :

                listeners: {
                    dragstart: (context) => {

                    this.onDragStart({context}) 
                },

                drag: (event) => {
                    console.log('drag:'); 
                },
                drop: (event) => {
                    console.log('drop:'); 
                },
                abort: (event) => {
                    console.log('abort:'); 
                },
                thisObj: this
            },

and the onDragStart function :

    onDragStart({context}){
        console.log('dragstart 11:'); 
        //console.log('context:'+(context == null)); 


    context.task = this.UnplannedGrid.getRecordFromElement(context.grabbed);
    


    //task = grid.getRecordFromElement(context.grabbed);
    // save a reference to the task so we can access it later
    //context.task = this.UnplannedGrid.getRecordFromElement(context.grabbed);
    //grid.store.remove(task);

    //grid.store.removeAll();
    console.log('dragstart 12:'); 
}

the line 'context.task = this.UnplannedGrid.getRecordFromElement(context.grabbed);'
doesn't work

BR


Post by frederick45 »

i found my pb and correct it


Post by alex.l »

Great to hear! Good luck!

All the best,
Alex


Post Reply