From f57048f4fe7aa175a6caf0959644ccf8b02e3a71 Mon Sep 17 00:00:00 2001 From: Kerem Sevencan Date: Wed, 28 Jun 2017 23:31:10 +0300 Subject: [PATCH] fix for v45 --- .../Contents/Sketch/const/library.js | 10 +++++----- .../Contents/Sketch/convert.js | 2 +- .../Contents/Sketch/manifest.json | 7 ++++--- .../Contents/Sketch/version.xml | 20 +++++++++++++++++++ 4 files changed, 30 insertions(+), 9 deletions(-) create mode 100644 iconfont.sketchplugin/Contents/Sketch/version.xml diff --git a/iconfont.sketchplugin/Contents/Sketch/const/library.js b/iconfont.sketchplugin/Contents/Sketch/const/library.js index 6d26006..000f838 100755 --- a/iconfont.sketchplugin/Contents/Sketch/const/library.js +++ b/iconfont.sketchplugin/Contents/Sketch/const/library.js @@ -104,11 +104,11 @@ var Library = { selected.setStringValue(icon) // set icon name selected.setName(name) - + //use same font size var _fontsize = selected.fontSize() - - // 8. set selected font + + // 8. set selected font if (sketchVersion > 370) { selected.setFont([NSFont fontWithName:@""+fontname size:_fontsize]) } else { @@ -190,7 +190,7 @@ var Library = { } // deselect all selected layers - doc.currentPage().deselectAllLayers() + // doc.currentPage().deselectAllLayers() // select the text layer [textLayer select:true byExpandingSelection:true]; @@ -333,7 +333,7 @@ var Library = { shape.style = layer.style() var style = shape.style() - if(!style.fill()) { + if(style.fill === undefined) { if (sketchVersion > 370) { var fill = style.addStylePartOfType(0) } else { diff --git a/iconfont.sketchplugin/Contents/Sketch/convert.js b/iconfont.sketchplugin/Contents/Sketch/convert.js index 10832a9..3a7a427 100755 --- a/iconfont.sketchplugin/Contents/Sketch/convert.js +++ b/iconfont.sketchplugin/Contents/Sketch/convert.js @@ -23,7 +23,7 @@ var onRun = function(context) { var layerPredicate = NSPredicate.predicateWithFormat(predicate); var layers = [scope filteredArrayUsingPredicate:layerPredicate]; - [[doc currentPage] deselectAllLayers]; + // [[doc currentPage] deselectAllLayers]; var loop = [layers objectEnumerator], layer; while (layer = [loop nextObject]) { diff --git a/iconfont.sketchplugin/Contents/Sketch/manifest.json b/iconfont.sketchplugin/Contents/Sketch/manifest.json index 3801005..f831ae8 100755 --- a/iconfont.sketchplugin/Contents/Sketch/manifest.json +++ b/iconfont.sketchplugin/Contents/Sketch/manifest.json @@ -76,8 +76,9 @@ ] }, "identifier" : "com.keremciu.sketch.iconfont", - "version" : "4.5.1", + "version" : "4.5.3", "description" : "Use icons like a boss.", "name" : "Icons", - "authorEmail" : "info@kerem.ws" -} + "authorEmail" : "info@kerem.ws", + "appcast" : "https://raw.githubusercontent.com/keremciu/sketch-iconfont/version.xml" +} \ No newline at end of file diff --git a/iconfont.sketchplugin/Contents/Sketch/version.xml b/iconfont.sketchplugin/Contents/Sketch/version.xml new file mode 100644 index 0000000..bb2dc3a --- /dev/null +++ b/iconfont.sketchplugin/Contents/Sketch/version.xml @@ -0,0 +1,20 @@ + + + + Icons + https://github.com/keremciu/sketch-iconfont + Use icons like a boss. + en + + Version 4.5.3 + + +
  • Fixes for Sketch 45
  • + + ]]> +
    + +
    +
    +
    \ No newline at end of file