diff --git a/Inventory/Color Inventory.sketchplugin b/Inventory/Color Inventory.sketchplugin index 31f9f40..2123bf0 100644 --- a/Inventory/Color Inventory.sketchplugin +++ b/Inventory/Color Inventory.sketchplugin @@ -296,4 +296,4 @@ function sortLeft(a, b) { return a.left - b.left; } -}()); +})(); diff --git a/Misc/Goto Anything.sketchplugin b/Misc/Goto Anything.sketchplugin deleted file mode 100644 index ce8e564..0000000 --- a/Misc/Goto Anything.sketchplugin +++ /dev/null @@ -1,64 +0,0 @@ -// (option cmd p) - -/** - * This plugin shows a list of artboards to choose from and jumps to the selected artboard. - * - * Florian Schulz Copyright 2014, MIT License - */ - -#import 'inventory.js' - -// put all artboards in a list with name and artboard reference -var artboards = doc.currentPage().artboards(); -var options = []; -var names = []; - -for (var i = 0; i < artboards.count(); i++) { - options.push({ - name: artboards[i].name(), - artboard: artboards[i] - }); -} - -options.sort(sortName); - -for (var j = 0; j < options.length; j++) { - names.push(options[j].name); -} -var choice = createSelect('Select artboard', names, 0) - -if (choice[0] == 1000) { - // get selected index - var index = choice[1]; - - // get artboard - var artboard = options[index].artboard; - - // deselect all layers - doc.currentPage().deselectAllLayers(); - - // select artboard - artboard.setIsSelected(true); - - // center view on artboard - com.getflourish.view.centerTo(artboard); -} - -function createSelect(msg, items, selectedItemIndex){ - selectedItemIndex = selectedItemIndex || 0 - - var accessory = [[NSComboBox alloc] initWithFrame:NSMakeRect(0,0,200,25)] - [accessory addItemsWithObjectValues:items] - [accessory selectItemAtIndex:selectedItemIndex] - - var alert = [[NSAlert alloc] init] - [alert setMessageText:msg] - [alert addButtonWithTitle:'OK'] - [alert addButtonWithTitle:'Cancel'] - [alert setAccessoryView:accessory] - - var responseCode = [alert runModal] - var sel = [accessory indexOfSelectedItem] - - return [responseCode, sel] -} \ No newline at end of file diff --git a/Readme.md b/Readme.md index f7c41ca..bedf82d 100644 --- a/Readme.md +++ b/Readme.md @@ -123,7 +123,7 @@ This improves the built in behavior of artboard duplication in Sketch. If the se This improves the built in behavior of artboard removal in Sketch. If the selected artboard is in the middle of other artboards, all artboards on the right side will be shifted to the left after the artboard has been removed. Requires any layer of an artboard to be selected. -**Shortcut:** `⌘` + `⌫` (Backspace) +**Shortcut:** `shift` + `⌘` + `⌫` ![Remove Artboard Animation](https://dl.dropboxusercontent.com/u/974773/_keepalive/Style%20Inventory/Remove%20Artboard.gif)