Skip to content

Commit

Permalink
Closes #4 Support group selection
Browse files Browse the repository at this point in the history
  • Loading branch information
nolastan committed Apr 29, 2015
1 parent a04155e commit 30efbc4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions personas.sketchplugin
@@ -1,9 +1,16 @@
var selection = context.selection;

// if nothing selected, display error
if([selection count] == 0){
return log('nothing selected');
}

// if group selected, get children
if(selection[0].className() == 'MSLayerGroup') {
group = selection[0];
selection = [group layers].array();
}

var user = getUser();

for (var i=0; i < [selection count]; i++) {
Expand Down

0 comments on commit 30efbc4

Please sign in to comment.