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
//This is very optional - it's for movement with the arrow keys which looks worse than the below commands | |
on("change:graphic", function(obj, prev) { | |
if (obj.get("pageid") == findObjs({type: 'page', name: 'Roleplay'})[0].get("_id")) { | |
//Dragging the token from one part of the screen to another is not a reason to flip them around. | |
if (obj.get("top") != prev.top) { | |
return; | |
} | |
if (obj.get("left") < prev.left && obj.get("fliph") ) { | |
obj.set( { | |
fliph: false |