Our pure JavaScript Scheduler component


Post by Exigo »

Hello,

Whenever I delete an event I wish to remove the dependencies that was tied to the deleted event (is this necessary or does the engine do this for me?).

After that I create a new dependency between the remaining events (between (1) and (3), the deleted event was at (2)) as seen by this picture

2020-11-24_13h59_51.png
2020-11-24_13h59_51.png (131.55 KiB) Viewed 610 times

However as the image shows, the dependencies does not always get removed from the view and gives an error whenever I hover over them.
How do I properly remove dependencies and make sure that they not show after deleting (this does not happen every time, but pretty regularly)


Post by mats »

Can you reproduce this in our online demos?


Post by Exigo »

No I do not seem to be able to do that, however when I run this:

// @ts-ignore
    this.scheduler.timeAxisViewModel.update();

It seems to not be an issue.. But I am trying to delete them from a contextMenu, where I cannot bind "this", or can you perhaps help me understand how, because I was not able to figure that out. Only worked for listeners for me this far.

2020-11-24_14h57_31.png
2020-11-24_14h57_31.png (22.94 KiB) Viewed 607 times

(RemoveSubtask) is basically removing its parent and all children when using an event tree structure.
I did not seem to have this issue whenever i was using a flat event structure


Post by mats »

This should not be needed:

this.scheduler.timeAxisViewModel.update();

It would be easier if you can show this in a demo. Try:

  1. https://www.bryntum.com/examples/scheduler-pro/dependencies/
  2. Open console
  3. Run
    scheduler.dependencyStore.on('change', console.log)
  4. Now run
    scheduler.eventStore.first.remove()

I see a console for the dependency automatically being removed.

PS. When removing multiple records - do it in one go (not in a for loop). Remove API supports arrays https://bryntum.com/docs/scheduler/#Core/data/Store#function-remove


Post Reply