Character Vault
Any Concept / Any System
Compendium
Your System Come To Life
Roll20 for Android
Streamlined for your Tablet
Roll20 for iPad
Streamlined for your Tablet

Personal tools

Difference between revisions of "Script:No Token Rotation"

From Roll20 Wiki

Jump to: navigation, search
m
(tagged as "discontinued API")
 
(4 intermediate revisions by one user not shown)
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 0 degrees rotation. In other words, rotation is prevented while this script is running.
+
{{script overview
 +
|name=No Token Rotation
 +
|author={{user profile|235259|Brian}}
 +
|version=1.1
 +
|lastmodified=2015-01-08}}
  
==== Code ====
+
'''No Token Rotation''' modifies the behavior of the rotation handle on graphics objects. When the rotation handle is released, the object is set to its previous rotation. In other words, rotation is prevented while this script is running.
<pre data-language="javascript">
+
<br clear="all">
on('change:graphic:rotation', function(obj, prev) { obj.set('rotation', 0); });
+
</pre>
+
  
[[Category:User API Scripts|No Token Rotation]]
+
=== Changelog ===
 +
{{changelog version|1.1|2015-01-08|* Release}}
 +
[[Category:Discontinued API Scripts]]

Latest revision as of 12:22, 17 June 2020

API ScriptAuthor: Brian
Version: 1.1
Last Modified: 2015-01-08
Code: No Token Rotation
Dependencies: None
Conflicts: None

No Token Rotation modifies the behavior of the rotation handle on graphics objects. When the rotation handle is released, the object is set to its previous rotation. In other words, rotation is prevented while this script is running.

[edit] Changelog

v1.1 (2015-01-08)

  • Release