diff --git a/sketch2app.sketchplugin/Contents/Sketch/library/core.js b/sketch2app.sketchplugin/Contents/Sketch/library/core.js index 75c2ebb..0e5e37b 100644 --- a/sketch2app.sketchplugin/Contents/Sketch/library/core.js +++ b/sketch2app.sketchplugin/Contents/Sketch/library/core.js @@ -195,14 +195,15 @@ var l4c = { processSlice: function(slice, document) { var frame = [slice frame] - var sliceName = [slice name] + var objectID = [slice objectID] + var sliceName = encodeURIComponent([slice name]) var baseDir = helpers.getCurrentDirectory(document) for (var i = 0; i < l4c.defs.factors.length; i++) { var scale = l4c.defs.factors[i].scale var suffix = l4c.defs.factors[i].suffix var version = l4c.makeSliceAndResizeWithFactor(slice, scale) - var fileName = baseDir + "/" + l4c.defs.localFolder + "/images/" + sliceName + suffix + ".png" + var fileName = baseDir + "/" + l4c.defs.localFolder + "/images/" + sliceName + "-" + objectID + suffix + ".png" [document saveArtboardOrSlice: version toFile: fileName] log("Saved " + fileName) } diff --git a/sketch2app.sketchplugin/Contents/Sketch/manifest.json b/sketch2app.sketchplugin/Contents/Sketch/manifest.json index fa07a40..3987b83 100644 --- a/sketch2app.sketchplugin/Contents/Sketch/manifest.json +++ b/sketch2app.sketchplugin/Contents/Sketch/manifest.json @@ -1,7 +1,7 @@ { "name": "Sketch2App", "description": "A Sketch Plugin to upload mobile design and create native app instantly. Design in Sketch and view result on device in real time.", - "version": "0.4.0", + "version": "0.4.1", "identifier": "instantapp.io.sketch2app", "appcast": "https://api.sketchpacks.com/v1/plugins/instantapp.io.sketch2app/appcast", "compatibleVersion": 3,