Can now color layers and apply strokes

This commit is contained in:
Unknown
2018-03-20 19:15:23 -04:00
parent 8f0e80863c
commit 71219e64d9
7 changed files with 331 additions and 74 deletions

View File

@@ -8,20 +8,6 @@ function newFile(path) {
return f
}
// Moves a layer
function positionLayer(lyr, x, y, alignment){
if(lyr.iisBackgroundLayer||lyr.positionLocked) return
var layerBounds = lyr.bounds;
var layerX = layerBounds[0].value;
if (alignment == 'top' || alignment == null)
var layerY = layerBounds[1].value;
else if (alignment == 'bottom')
var layerY = layerBounds[3].value;
var deltaX = x-layerX;
var deltaY = y-layerY;
lyr.translate(deltaX, deltaY);
}
// Prints an error message.
function err(e) {
return 'ERROR: ' + e.message + ' at ' + e.fileName + ':' + e.line;