mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-31 07:29:49 +00:00
parent
b95d884dcc
commit
9805af36b0
|
@ -141,8 +141,12 @@ func draw_move(position: Vector2) -> void:
|
||||||
selection_node.big_bounding_rectangle.position
|
selection_node.big_bounding_rectangle.position
|
||||||
- prev_pos
|
- prev_pos
|
||||||
)
|
)
|
||||||
position = position.snapped(Vector2(Global.grid_width, Global.grid_height))
|
position = position.snapped(grid_size)
|
||||||
position += Vector2(Global.grid_offset_x, Global.grid_offset_y)
|
var grid_offset = Vector2(Global.grid_offset_x, Global.grid_offset_y)
|
||||||
|
grid_offset = Vector2(
|
||||||
|
fmod(grid_offset.x, grid_size.x), fmod(grid_offset.y, grid_size.y)
|
||||||
|
)
|
||||||
|
position += grid_offset
|
||||||
|
|
||||||
if _move_content:
|
if _move_content:
|
||||||
selection_node.move_content(position - _offset)
|
selection_node.move_content(position - _offset)
|
||||||
|
|
Loading…
Reference in a new issue