Query |
Response |
One final follow-up with regard to the visual cue for selection and the resizeBorder rectangle.
My solution was to add a view model property whose state was managed by the selectionChange event (insert + changed) to detect my condition. I then activate a CSS class (diagram-override-noresize) on the diagram dive to hide the resize items within the diagram, leaving the rectangle for the visual cue. |
Please use the below code example to hide the selector in the selectionChange event.
Code example:
self.resolveSelectionChange = function(args) {
if (args && args.state === "changed") {
$(".resizeCorners").hide()
}
} |
For future readers of this thread, when you handle the event, be sure to be mindful of the args.state/args.cause values as the event will fire twice per selection change, as alluded to in the documentation.
In example:
1. Select nodes
- First fire of changeType "insert" with cause "rubberBand" and state of "changing"
- Second fire of changeType "insert" with cause "unknown" and state of "changed"
2. Deselect nodes
- First fire of changeType "remove" with cause "mouse" and state of "changing"
- Second fire of changeType "remove" with cause "unknown" and state of "changed"
|
Yes, we will change the args.cause value in the selectionChange event and provide you the patch on 24th February,2017. |