├── README.md └── Resize to Master.sketchplugin └── Contents ├── Resources └── scale24.tiff └── Sketch ├── manifest.json └── script.cocoascript /README.md: -------------------------------------------------------------------------------- 1 | # sketch-resize-symbol 2 | A Sketch plugin to resize Symbol instances to their original size. 3 | -------------------------------------------------------------------------------- /Resize to Master.sketchplugin/Contents/Resources/scale24.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abynim/sketch-resize-symbol/609906e723826f2d19f90ecb1dc10d5a956ff870/Resize to Master.sketchplugin/Contents/Resources/scale24.tiff -------------------------------------------------------------------------------- /Resize to Master.sketchplugin/Contents/Sketch/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "author" : "Aby Nimbalkar", 3 | "commands" : [ 4 | { 5 | "script" : "script.cocoascript", 6 | "name" : "Set Symbol to Original Size", 7 | "shortcut" : "cmd shift 1", 8 | "icon" : "scale24.tiff", 9 | "description" : "Resize selected Symbol instances to their original size", 10 | "handlers" : { 11 | "run" : "onRun" 12 | }, 13 | "identifier" : "resizeToMaster" 14 | } 15 | ], 16 | "menu" : { 17 | "isRoot" : true, 18 | "items" : [ 19 | "resizeToMaster" 20 | ], 21 | "title" : "Set Symbol to Original Size" 22 | }, 23 | "identifier" : "com.abynim.sketchplugins.resizetomaster", 24 | "version" : "1.0", 25 | "description" : "Add a shortcut for resizing Symbol instances to their original size.", 26 | "authorEmail" : "abynimbalkar@gmail.com", 27 | "name" : "Resize to Master", 28 | "disableCocoaScriptPreprocessor" : true 29 | } -------------------------------------------------------------------------------- /Resize to Master.sketchplugin/Contents/Sketch/script.cocoascript: -------------------------------------------------------------------------------- 1 | var onRun = function(context) { 2 | var selection = context.selection, 3 | loop = selection.objectEnumerator(), layer; 4 | while(layer = loop.nextObject()) { 5 | if(layer.class() === MSSymbolInstance) { 6 | layer.resetSizeToMaster() 7 | } 8 | } 9 | } 10 | --------------------------------------------------------------------------------