File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
ui/src/workflow/nodes/loop-body-node Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,24 @@ const renderGraphData = (data?: any) => {
6565 },
6666 })
6767
68+ function HtmlPointToCanvasPoint(point : any ) {
69+ let scaleX = lf .value .graphModel .transformModel .SCALE_X as number
70+ let scaleY = lf .value .graphModel .transformModel .SCALE_Y as number
71+ let translateX = lf .value .graphModel .transformModel .TRANSLATE_X
72+ let translateY = lf .value .graphModel .transformModel .TRANSLATE_Y
73+ const [x, y] = point
74+ props .nodeModel .graphModel .transformModel
75+ scaleX *= props .nodeModel .graphModel .transformModel .SCALE_X
76+ scaleY *= props .nodeModel .graphModel .transformModel .SCALE_Y
77+ translateX *= props .nodeModel .graphModel .transformModel .SCALE_X
78+ translateY *= props .nodeModel .graphModel .transformModel .SCALE_Y
79+ return [(x - translateX ) / scaleX , (y - translateY ) / scaleY ]
80+ }
81+
82+ lf .value .graphModel .transformModel .HtmlPointToCanvasPoint = HtmlPointToCanvasPoint .bind (
83+ lf .value .graphModel .transformModel ,
84+ )
85+
6886 initDefaultShortcut (lf .value , lf .value .graphModel )
6987 lf .value .graphModel .get_provide = (node : any , graph : any ) => {
7088 return {
You can’t perform that action at this time.
0 commit comments