Skip to content
This repository has been archived by the owner on Mar 30, 2023. It is now read-only.

Commit

Permalink
Export scaling disabled for Sketch 41
Browse files Browse the repository at this point in the history
Disabled export scaling for Sketch 41+ version until find fix for that.
Scaling still work older version of Sketch.
  • Loading branch information
duoable committed Nov 9, 2016
1 parent 2a60ed3 commit bffef71
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
11 changes: 8 additions & 3 deletions AnimateMate.sketchplugin/Contents/Sketch/library/Animate.js
Original file line number Diff line number Diff line change
Expand Up @@ -518,9 +518,14 @@ Animate.prototype.getLayers = function (layers, loopNestedGroups) {
Animate.prototype.saveImagePNG = function (keyframeNumber, exportFolder, scaleValue) {
var exportFolder = exportFolder || this.exportFolders.tempFolder.folderPath;
var fileName = exportFolder.stringByAppendingPathComponent(this.exportName + '_' + keyframeNumber + '.png');
var scaleSlice = [MSExportRequest requestWithRect:utils.artboardRect scale:scaleValue];
//utils.doc.saveArtboardOrSlice_toFile_(utils.artboard, fileName);
utils.doc.saveArtboardOrSlice_toFile_(scaleSlice, fileName);
if (utils.sketchVersion >= 41) {
utils.doc.saveArtboardOrSlice_toFile_(utils.artboard, fileName);
}
else {
// Work only with sketch < 41 version
var scaleSlice = [MSExportRequest requestWithRect:utils.artboardRect scale:scaleValue];
utils.doc.saveArtboardOrSlice_toFile_(scaleSlice, fileName);
}
};


Expand Down
2 changes: 1 addition & 1 deletion AnimateMate.sketchplugin/Contents/Sketch/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"author": "Creatide",
"authorEmail": "[email protected]",
"homepage": "http://github.com/Creatide/AnimateMate",
"version": "0.1.6",
"version": "0.1.7",
"identifier": "com.creatide.sketch.animatemate",
"compatibleVersion": "3.5.2",
"bundleVersion": 1,
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ Here are a couple examples that are made using **AnimateMate** plugin in **Sketc
![Example 9](https://github.com/Creatide/AnimateMate/blob/gh-pages/img/readme/AnimateMate_Example_CassetteDemo.gif)


## Known Bugs to Fix

* [] Export scaling option doesn't work after Sketch 41 version.

## Roadmap & Feature Ideas

* [x] Remember values in some input fields in dialogs
Expand Down

0 comments on commit bffef71

Please sign in to comment.