-
Notifications
You must be signed in to change notification settings - Fork 851
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Changing link target or source breaks CommandManager in Angular #2719
Labels
Comments
ArthurWietzorek
changed the title
[Bug]: Changing link target breaks CommandManager in Angular
[Bug]: Changing link target or source breaks CommandManager in Angular
Jul 24, 2024
We can reproduce the issue. Here's a workaround for the time being: this.paper.on('link:connect', () => {
this.commandManager.storeBatchCommand()
}); |
Here's a proper patch that you need to apply locally until we release a new version. joint.dia.CellView.prototype.pointerup = function(evt, x, y) {
const { graph = this.model.graph } = this.eventData(evt);
this.notify('cell:pointerup', evt, x, y);
if (graph) {
// we don't want to trigger event on model as model doesn't
// need to be member of collection anymore (remove)
graph.stopBatch('pointer', { cell: this.model });
}
} It's a regression caused by this PR. |
It will be fixed by #2720. |
Thank you once again for the quick help, the patch works perfectly fine in our application as well. Looking forward to the next update! 👍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Current versus expected behaviour
When running the kitchensink application in Angular 16, changing the target or source of a link breaks the CommandManager. The change itself and any changes made after that action are no longer put on the undo stack. No error is shown in the browser console.
This bug occurs in both JointJS+ 4.0.0 and 4.0.1, but only in the Angular kitchensink app and not it the plain JS one. It does not occur in the previous 3.7.3 version.
Other changes to links to not cause this problem, vertices for example can be added, moved and removed and the CommandManager works just fine.
We have an application based on both Angular and JointJS+ and we encountered the same problem there.
Steps to reproduce
Version
4.0.1
What browsers are you seeing the problem on?
Firefox, Chrome
What operating system are you seeing the problem on?
Linux
The text was updated successfully, but these errors were encountered: