moveabl
moveable_UI
Version 1.2
Created 2021/09/06
Category Max/Msp Examples
SourceCode
ZipSize 11.53 KB
Downloads 1,252
Description:

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.

Pics:
moveable_UI.maxpat
Source Code:

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. 

Changelog:

v 1.2:

  • added script to resize window

v 1.1:

  • added dragging of a bpatcher from inside