File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
editor/src/messages/tool/common_functionality/shapes Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -70,13 +70,16 @@ impl Line {
70
70
return ;
71
71
} ;
72
72
73
+ let transform_from_document = document. metadata ( ) . transform_to_document ( layer) . inverse ( ) ;
74
+ let layer_points = document_points. map ( |point| transform_from_document. transform_point2 ( point) ) ;
75
+
73
76
responses. add ( NodeGraphMessage :: SetInput {
74
77
input_connector : InputConnector :: node ( node_id, 1 ) ,
75
- input : NodeInput :: value ( TaggedValue :: DVec2 ( document_points [ 0 ] ) , false ) ,
78
+ input : NodeInput :: value ( TaggedValue :: DVec2 ( layer_points [ 0 ] ) , false ) ,
76
79
} ) ;
77
80
responses. add ( NodeGraphMessage :: SetInput {
78
81
input_connector : InputConnector :: node ( node_id, 2 ) ,
79
- input : NodeInput :: value ( TaggedValue :: DVec2 ( document_points [ 1 ] ) , false ) ,
82
+ input : NodeInput :: value ( TaggedValue :: DVec2 ( layer_points [ 1 ] ) , false ) ,
80
83
} ) ;
81
84
responses. add ( NodeGraphMessage :: RunDocumentGraph ) ;
82
85
}
You can’t perform that action at this time.
0 commit comments