Move
move operator allows to move controls
a -> (x, y)
There are four possible move types:
-
move by relative value
control -> +(50,100) // same as +[1,2] -
move to absolute position
control -> (100,100) -
move to other control position
control -> otherControl -
move to other control position with offset
control -> otherControl+[2,0]
- DABL
- HTML
title: 'move control'
box id: otherBox at: [2,0]
dot id: d1 text: 'dot' at: [-3,-2] radius: 35
step: 'move dot by 4 cells right'
d1 -> +[4,0] // relative move
step: 'move to [0,1]'
d1 -> [0,1] // absolute move
step: 'move to otherBox'
d1 -> otherBox // move to other control
step: 'move d1 by -[2,0]'
d1 -> -[2,0]
step: 'move d1 to other box with offset [2,0]'
d1 -> otherBox+[2,0]
<dot-and-box
controls
style="height: 250px"
code="
title: 'move control'
box id: otherBox at: [2,0]
dot id: d1 text: 'dot' at: [-3,-2] radius: 35
step: 'move dot by 4 cells right'
d1 -> +[4,0]
step: 'move to [0,1]'
d1 -> [0,1]
step: 'move to otherBox'
d1 -> otherBox
step: 'move d1 by -[2,0]'
d1 -> -[2,0]
step: 'move d1 to other box with offset [2,0]'
d1 -> otherBox+[2,0]
"
>
</dot-and-box>