Node object size changes with mouse wheel

Scroll the mouse, expand or shrink the object nodes on the diagram. I want to make some changes to the nodes. What methods should I use in ToolManager? Do you have any examples?

Your description of what you want to do is very vague. Could you please be more specific and provide small screenshots or sketches showing both before and after those “changes to the nodes”?

Maybe you are interested in something like the “semantic zoom level” slider shown in the Regrouping sample: Regrouping Demo. Certainly you could override ToolManager.doMouseWheel to do what is done in that sample’s reexpand function.

When the mouse scrolls (zoom In or zoom Out), the size of the node changes, and how to get the size of the node after the change.

Yes, control-mouse-wheel events “zoom” by changing the Diagram.scale. The actualBounds of each node does not change, but they will appear larger or smaller due to the scale. If you want the apparent size being displayed, you can multiply the Node.actualBounds .width or .height by the Diagram.scale.

If this is not what you are asking, please provide a screenshot or sketches of what you’d like.

Thank you very much for the perfect solution to my problem.