mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-19 02:48:12 +08:00
Port node graph wires to the backend and improve graph UI performance (#2795)
* Improve node graph performance * Fix wire bugs, add type default for properties. * Grid aligned wire paths * remove type source * node from exposed input * Refresh wires on preference change * merge fixes * Code review * Fix names * Code review * Fix wires on redo/undo --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
@@ -67,6 +67,10 @@ impl ClickTarget {
|
||||
self.bounding_box
|
||||
}
|
||||
|
||||
pub fn bounding_box_center(&self) -> Option<DVec2> {
|
||||
self.bounding_box.map(|bbox| bbox[0] + (bbox[1] - bbox[0]) / 2.)
|
||||
}
|
||||
|
||||
pub fn bounding_box_with_transform(&self, transform: DAffine2) -> Option<[DVec2; 2]> {
|
||||
self.bounding_box.map(|[a, b]| [transform.transform_point2(a), transform.transform_point2(b)])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user