]> gerrit.simantics Code Review - simantics/platform.git/commit
G2DParentNode handles "undefined" child bounds separately 82/3582/2
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Wed, 20 Nov 2019 14:33:29 +0000 (16:33 +0200)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Wed, 20 Nov 2019 14:34:46 +0000 (16:34 +0200)
commitad29e24f50e336add4c28df14312b3134ab93427
treeb9ab5b6c9f6c4a5229b3712f8bd04ebb41fd3643
parent17046fccd0b4bdcd479aadf4b204c1a06a2c896c
G2DParentNode handles "undefined" child bounds separately

Previously nodes could only return null to say "I have no bounds".
Now it is possible to return GeometryUtils.undefinedBounds() to say
"ignore my bounds" to G2DParentNode.

Also allow customization of the node class used by ElementPainter to
mark selections under "element nodes" through a new configuration class
ElementPainterConfiguration.

This allows e.g. district to use its own node for this purpose to
optimize the scene graph and customize the bounds it returns.

gitlab #419

Change-Id: I210fd26be5d269847277616b9d5c52ef4f930dd7
bundles/org.simantics.g2d/src/org/simantics/g2d/diagram/participant/ElementPainter.java
bundles/org.simantics.g2d/src/org/simantics/g2d/diagram/participant/ElementPainterConfiguration.java [new file with mode: 0644]
bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/g2d/G2DParentNode.java
bundles/org.simantics.scenegraph/src/org/simantics/scenegraph/utils/GeometryUtils.java