Blog post preview
November 1, 2023

Demo Wednesday: Inspector for Selection

We've published a new demo: Inspector for Selection

Did you ever need to view and modify the data of multiple diagram elements at once? Thanks to the combined power of the Inspector and Selection plugins of JointJS+, you can!

The Inspector component cross-checks the collection of selected elements, and chooses the most sensible value to fill in for each property. There are three possibilities:

  • If a property has the same value in all selected elements, the Inspector shows that value.
  • Meanwhile, if your selected elements have multiple different values for one property, the Inspector shows a dash as a placeholder within the corresponding input field.
  • However, if some selected elements do not support a property at all, then the input field is not displayed in the Inspector either. For example, the corner radius attribute does not make sense for Ellipses; therefore, it is not shown whenever your selection contains an ellipse element.

In any case, when you edit a property, the Inspector makes sure to assign the new value to all elements within your current selection. Try it for yourself in today's example.

Every Wednesday we share diagramming tips, interesting features and news in JointJS. Learn with us, get content delivered straight to your inbox and become a real diagramming pro:

Authors
Blog post author
Zbyněk Stara
Computer nerd, traveler, husband and occasional runner. Experienced in JavaScript software development.
No items found.
Stay in the loop

Speed up your development with a powerful library