Category Max/Msp Examples
Files jsui_drag_bpatcher.js jsui_drag_object.js jsui_drag_window.js jsui_resize_window.js moveable_UI.maxpat
ZipSize 11.53 KB
Click n' drag to move/resize the patcher window, a bpatcher or objects in a locked patcher. It's based on jsui scripts which are included. It works in a locked patcher in patching and presentation view. Additionally, we can constrain the movement to a certain area.
Before we move any object in js with the Max api, we need to know 2 things: 1. are we in presentation view? 2. do we move a window, bpatcher or another object?
Depending on this, there are different methods that we have to use to get and set the position. The included js covers all of these cases and is therefore a good code example to keep.
- added script to resize window
- added dragging of a bpatcher from inside