Difference between revisions of "Script:No Token Rotation"
From Roll20 Wiki
(new) |
m |
||
Line 1: | Line 1: | ||
− | The following script modifies the behavior of the rotation handle on graphics objects. When the rotation handle is released, the object is set to | + | The following script modifies the behavior of the rotation handle on graphics objects. When the rotation handle is released, the object is set to 0 degrees rotation. In other words, rotation is prevented while this script is running. |
==== Code ==== | ==== Code ==== |
Revision as of 08:56, 21 September 2013
The following script modifies the behavior of the rotation handle on graphics objects. When the rotation handle is released, the object is set to 0 degrees rotation. In other words, rotation is prevented while this script is running.
Code
on('change:graphic:rotation', function(obj, prev) { obj.set('rotation', 0); });