Fix an assortment of small bugs (#3968)

* Fix an assertion failure bug when scaling a line in the transform cage

* Fix missing defaults on node gradient inputs

* Fix Blend Shapes path input wire not updating to show in the UI after Layer > Blend

* Fix assertion failure due to browser non-monotonic timestamp

* Fix SVG renderer drawing 1px strokes as half-width when using stroke alignment

* Fix incorrect appearance of the ColorInput widget when set to "none" and "disabled"

* Fix lerp function in Fill enum to handle None cases correctly

* Fix stroke alignment bug
This commit is contained in:
Keavon Chambers
2026-03-28 17:12:13 -07:00
committed by GitHub
parent 865e9713ad
commit 6388a32ac5
7 changed files with 26 additions and 12 deletions
@@ -139,7 +139,8 @@ impl FrameTimeInfo {
}
pub fn advance_timestamp(&mut self, next_timestamp: Duration) {
debug_assert!(next_timestamp >= self.timestamp);
// Guard against non-monotonic timestamps from the browser (Keavon observed this once in Chrome)
let next_timestamp = next_timestamp.max(self.timestamp);
self.prev_timestamp = Some(self.timestamp);
self.timestamp = next_timestamp;
@@ -4005,6 +4005,14 @@ impl NodeNetworkInterface {
}
}
(_, NodeInput::Node { node_id: upstream_node_id, .. }) => {
// If the old input wasn't exposed but the new one is (`Node` inputs are always exposed),
// the node's port count changed, so its click targets need to be recomputed
if !old_input.is_exposed()
&& let InputConnector::Node { node_id, .. } = input_connector
{
self.unload_node_click_targets(node_id, network_path);
}
// Load structure if the change is to the document network and to the first or second
if network_path.is_empty() {
if matches!(input_connector, InputConnector::Export(0)) {
@@ -212,16 +212,15 @@ impl SelectedEdges {
let original_from_pivot = updated - pivot; // The original vector from the point to the pivot
let mut scale_factor = new_from_pivot / original_from_pivot;
// Constrain should always scale by the same factor in x and y
// Constrain should always scale by the same factor in x and y.
// When one axis of `original_from_pivot` is near zero (e.g. for a line's degenerate bounding box),
// the scale factor for that axis is numerically unstable, so we copy from the more stable axis.
if constrain {
// When the point is on the pivot, we simply copy the other axis.
if original_from_pivot.x.abs() < 1e-5 {
if original_from_pivot.x.abs() < original_from_pivot.y.abs() {
scale_factor.x = scale_factor.y;
} else if original_from_pivot.y.abs() < 1e-5 {
} else {
scale_factor.y = scale_factor.x;
}
debug_assert!((scale_factor.x - scale_factor.y).abs() < 1e-5);
}
if !(self.left || self.right || constrain) {