Notification when a diagram becomes dirty

Hi,

Is there a way to get notified as soon as a diagram becomes dirty (i.e. is modified, either by adding/removing/moving elements or changing properties)?

I would like for instance to activate a SAVE button when this happens (and keep this SAVE button disabled as long as no changes are made).

This post (How to get an alert when close the tab (without saving)? - #2 by philippfromme) is great, however it’s useful to check the dirtiness, but not to trigger a notification.

Listening to the click events is both not enough (due to keyboard shortcuts), and too wide (someone can click something and not change anything).

Many thanks!

Found the solution with the 'elements.changed'event thanks to this post:

Thanks!

1 Like