Skip to content
This repository has been archived by the owner on Sep 19, 2021. It is now read-only.

Commit

Permalink
v1.1.1
Browse files Browse the repository at this point in the history
Compatible with Sketch 47+, fixes #1
  • Loading branch information
marcbouchenoire committed Oct 20, 2017
1 parent 4592e9d commit 0c7c9e4
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
11 changes: 11 additions & 0 deletions .appcast.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,16 @@
</description>
<enclosure url="https://github.com/bouchenoiremarc/Sketch-Maps/releases/download/v1.1/Sketch.Maps.sketchplugin.zip" sparkle:version="1.1"/>
</item>
<item>
<title>Version 1.1.1</title>
<description>
<![CDATA[
<ul>
<li>Compatible with Sketch 47+</li>
</ul>
]]>
</description>
<enclosure url="https://github.com/bouchenoiremarc/Sketch-Maps/releases/download/v1.1.1/Sketch.Maps.sketchplugin.zip" sparkle:version="1.1.1"/>
</item>
</channel>
</rss>
6 changes: 5 additions & 1 deletion Sketch Maps.sketchplugin/Contents/Sketch/main.cocoascript
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ var onRun = function(context) {
if (toNSString(image) == null) {
var fill = currentLayer.style().fills().firstObject();
fill.setFillType(4);
fill.setImage(MSImageData.alloc().initWithImage_convertColorSpace(NSImage.alloc().initWithData(image), false));
if (MSApplicationMetadata.metadata().appVersion < 47) {
fill.setImage(MSImageData.alloc().initWithImage_convertColorSpace(NSImage.alloc().initWithData(image), false));
} else {
fill.setImage(MSImageData.alloc().initWithImage(NSImage.alloc().initWithData(image)));
}
currentLayer.style().fills().firstObject().setPatternFillType(1);
} else {
var message = JSON.parse(toNSString(image)).message;
Expand Down
2 changes: 1 addition & 1 deletion Sketch Maps.sketchplugin/Contents/Sketch/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"author" : "Marc Bouchenoire",
"authorEmail" : "mail@marcbouchenoire.com",
"homepage": "https://github.com/bouchenoiremarc/Sketch-Maps",
"version" : "1.1",
"version" : "1.1.1",
"appcast": "https://raw.githubusercontent.com/bouchenoiremarc/Sketch-Maps/master/.appcast.xml",
"identifier" : "com.bouchenoiremarc.sketch-maps",
"compatibleVersion": 4,
Expand Down

0 comments on commit 0c7c9e4

Please sign in to comment.