Created
July 14, 2019 08:45
-
-
Save toomasv/12a3a1781bc42f23a418aa888be3065b to your computer and use it in GitHub Desktop.
Drag and drop base into panel, dbl-click to get it out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Red [ | |
Description: {Dragn'drop into panel} | |
Date: 14-July-2019 | |
] | |
context [ | |
hop: false | |
pan: pane: ofs: none | |
view [ | |
base loose | |
on-down [move find pane: face/parent/pane face tail pane] | |
on-drop [ | |
if all [ | |
not hop | |
face/parent/type = 'window | |
within? ofs: face/offset pan/offset pan/size | |
][ | |
move find face/parent/pane face pan/pane | |
face/offset: ofs - pan/offset | |
] | |
hop: false | |
] | |
on-dbl-click [ | |
if face/parent/type = 'panel [ | |
ofs: face/offset | |
move find face/parent/pane face tail event/window/pane | |
face/offset: pan/offset + ofs | |
hop: true | |
] | |
] | |
pan: panel beige [] | |
] | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment