Skip to content

Commit 8acf3db

Browse files
committed
fix: restore the debug information of the master branch
1 parent d8474c4 commit 8acf3db

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

editor/src/messages/portfolio/document/graph_operation/transform_utils.rs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,27 +76,22 @@ impl LayerBounds {
7676

7777
/// Get the current affine transform from the transform node's inputs
7878
pub fn get_current_transform(inputs: &[NodeInput]) -> DAffine2 {
79-
const TRANSLATION_INDEX: usize = 1;
80-
const ROTATION_INDEX: usize = 2;
81-
const SCALE_INDEX: usize = 3;
82-
const SKEW_INDEX: usize = 4;
83-
84-
let translation = if let Some(&TaggedValue::DVec2(translation)) = inputs[TRANSLATION_INDEX].as_value() {
79+
let translation = if let Some(&TaggedValue::DVec2(translation)) = inputs[TranslationInput::INDEX].as_value() {
8580
translation
8681
} else {
8782
DVec2::ZERO
8883
};
89-
let rotation = if let Some(&TaggedValue::F64(rotation)) = inputs[ROTATION_INDEX].as_value() {
84+
let rotation = if let Some(&TaggedValue::F64(rotation)) = inputs[RotationInput::INDEX].as_value() {
9085
rotation
9186
} else {
9287
0.
9388
};
94-
let scale = if let Some(&TaggedValue::DVec2(scale)) = inputs[SCALE_INDEX].as_value() {
89+
let scale = if let Some(&TaggedValue::DVec2(scale)) = inputs[ScaleInput::INDEX].as_value() {
9590
scale
9691
} else {
9792
DVec2::ONE
9893
};
99-
let shear = if let Some(&TaggedValue::DVec2(shear)) = inputs[SKEW_INDEX].as_value() {
94+
let shear = if let Some(&TaggedValue::DVec2(shear)) = inputs[SkewInput::INDEX].as_value() {
10095
shear
10196
} else {
10297
DVec2::ZERO

node-graph/libraries/no-std-types/src/color/discrete_srgb.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,11 @@ mod tests {
162162
#[test]
163163
fn test_float_to_srgb_u8() {
164164
for u in 0..=u8::MAX {
165+
// let a = srgb_u8_to_float(u);
166+
// let b = srgb_u8_to_float_ref(u);
167+
// if a != b {
168+
// panic!("Mismatch at u={}: {} != {}", u, a, b);
169+
// }
165170
assert!(srgb_u8_to_float(u) == srgb_u8_to_float_ref(u));
166171
}
167172
}

0 commit comments

Comments
 (0)