Last active
June 13, 2017 21:34
-
-
Save felideon/23eec5d0cb320736f1a6e73e4e698423 to your computer and use it in GitHub Desktop.
Add arrow head to end of line or vector.
This file contains hidden or 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
/* Thanks to sample code here: | |
https://github.com/wodory/flowmate | |
https://github.com/turbobabr/Sketch-Plugins-Cookbook | |
*/ | |
var selection = context.selection; | |
var layer = selection.firstObject(); | |
if(layer && layer.isKindOfClass(MSShapeGroup)) { | |
var path = layer.layers().firstObject(); | |
if(path && path.isKindOfClass(MSShapePathLayer)) { | |
path.setEndDecorationType(2); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment