mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-26 07:38:12 +08:00
Fix 'Jitter Points' and 'Sample Polylines' working incorrectly with X or Y scale of 0 content (#3984)
* Fix NaN points produced by Sample Polylines on 0-scaled input * Fix Jitter Points inverse transform for zero-scale axes and stop resetting stroke transform * Remove a couple confusing Debug nodes * Fix edge case * Update demo art * Fix order change in Jitter Points causing different results from earlier * Fix bug in bisect tool * Break out functionality into helper functions
This commit is contained in:
@@ -1822,6 +1822,9 @@ impl ShapeState {
|
||||
/// Find the `t` value along the path segment we have clicked upon, together with that segment ID.
|
||||
fn closest_segment(&self, network_interface: &NodeNetworkInterface, layer: LayerNodeIdentifier, position: glam::DVec2, tolerance: f64) -> Option<ClosestSegment> {
|
||||
let transform = network_interface.document_metadata().transform_to_viewport_if_feeds(layer, network_interface);
|
||||
if transform.matrix2.determinant() == 0. {
|
||||
return None;
|
||||
}
|
||||
let layer_pos = transform.inverse().transform_point2(position);
|
||||
|
||||
let tolerance = tolerance + 0.5;
|
||||
|
||||
Reference in New Issue
Block a user