Skip to content

Commit

Permalink
解决选错元素会秒退。
Browse files Browse the repository at this point in the history
  • Loading branch information
bugluo committed Aug 10, 2017
1 parent 68a33d9 commit ea7c66d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion WeSketch.sketchplugin/Contents/Sketch/sortingLayers.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ function sortingLayers(context){
if(selection.length == 0){
return NSApp.displayDialog(i18.m2);
}
var artboard = selection[0].parentArtboard();
if(selection[0].className() == "MSArtboardGroup" ||selection[0].className() == "MSSymbolMaster"){
return NSApp.displayDialog('请选择元素进行操作');
}
var artboard = selection[0].parentGroup();
var length = selection.length;
var order = {};

Expand Down

0 comments on commit ea7c66d

Please sign in to comment.