Skip to content

Commit 3066150

Browse files
authored
Merge pull request #64 from MengTo/Amol-Fixes
Amol fixes
2 parents bf0b923 + e3d8331 commit 3066150

11 files changed

+19
-40
lines changed

Angle.sketchplugin/Contents/Sketch/apply.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Angle.sketchplugin/Contents/Sketch/manifest.json

+3-24
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,25 @@
11
{
22
"bundleVersion": 1,
3-
"version": "1.1.5",
3+
"version": "1.1.6",
44
"icon": "icon.png",
55
"identifier": "io.designcode.Angle",
6-
"description": "Important note: use 1.1.5 for Sketch 66+ and 1.1.4 for Sketch 65 and earlier. Apply perspective transforms on screen mockups. Auto-detect screens by resolution and works on shapes and symbols. Super fast.",
6+
"description": "Important note: use version 1.1.6 for Sketch Sketch 72+, version 1.1.5 for Sketch 66 to Sketch 71 and 1.1.4 for Sketch 65 and earlier. Apply perspective transforms on screen mockups. Auto-detect screens by resolution and works on shapes and symbols.",
77
"homepage": "https://angle.sh",
88
"author": "Design+Code",
99
"authorEmail": "[email protected]",
1010
"compatibleVersion": 50,
1111
"commands": [
12-
{
13-
"name": "Rotate Mockup",
14-
"identifier": "Angle-Rotate-Mockup",
15-
"script": "rotate.js",
16-
"shortcut": "control \\"
17-
},
18-
{
19-
"name": "Flip Mockup",
20-
"identifier": "Angle-Rotate-Flip",
21-
"script": "symmetry.js",
22-
"shortcut": "cmd shift \\"
23-
},
2412
{
2513
"name": "Apply Mockup",
2614
"identifier": "Angle-Apply-Mockup",
2715
"script": "apply.js",
2816
"shortcut": "cmd \\"
29-
},
30-
{
31-
"name": "Reset Mockup",
32-
"identifier": "Angle-Reset-Metadata",
33-
"script": "reset.js",
34-
"shortcut": "cmd control \\"
3517
}
3618
],
3719
"menu": {
3820
"title": "Angle",
3921
"items": [
40-
"Angle-Apply-Mockup",
41-
"Angle-Rotate-Flip",
42-
"Angle-Rotate-Mockup",
43-
"Angle-Reset-Metadata"
22+
"Angle-Apply-Mockup"
4423
]
4524
},
4625
"name": "Angle",

Angle.sketchplugin/Contents/Sketch/reset.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Angle.sketchplugin/Contents/Sketch/rotate.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Angle.sketchplugin/Contents/Sketch/symmetry.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "angle",
3-
"version": "1.1.5",
3+
"version": "6",
44
"repository": "https://github.com/MengTo/Angle-Sketch-Plugin",
5-
"description": "Important note: use 1.1.5 for Sketch 66+ and 1.1.4 for Sketch 65 and earlier. Apply perspective transforms on screen mockups. Auto-detect screens by resolution and works on shapes and symbols. Super fast.",
5+
"description": "Important note: use version 1.1.6 for Sketch Sketch 72+, version 1.1.5 for Sketch 66 to Sketch 71 and 1.1.4 for Sketch 65 and earlier. Apply perspective transforms on screen mockups. Auto-detect screens by resolution and works on shapes and symbols.",
66
"engines": {
77
"sketch": ">=3.0"
88
},

src/Angle.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ export default class Angle {
173173
exporter() {
174174
const colorSpace = this.context.document.colorSpace();
175175

176-
const sketchVersion = MSApplicationMetadata.metadata().appVersion;
176+
const sketchVersion = BCSketchInfo.shared().metadata().appVersion;
177177
if (sketchVersion < 52)
178178
return MSExporter.exporterForRequest_colorSpace(
179179
this.exportRequest_lessThan52(),
@@ -225,7 +225,7 @@ export default class Angle {
225225
}
226226

227227
get pointsAreValid() {
228-
const sketchVersion = MSApplicationMetadata.metadata().appVersion;
228+
const sketchVersion = BCSketchInfo.shared().metadata().appVersion;
229229

230230
if (sketchVersion < 50) return this.pointsAreValid_lessThan50;
231231

@@ -299,7 +299,7 @@ export default class Angle {
299299
this.rotate();
300300
}
301301

302-
const sketchVersion = MSApplicationMetadata.metadata().appVersion;
302+
const sketchVersion = BCSketchInfo.shared().metadata().appVersion;
303303
if (sketchVersion < 50 || sketchVersion >= 52) {
304304
let shoelaceSumOfPoints = this.shorlaceSum();
305305
if (shoelaceSumOfPoints < 0) {
@@ -342,7 +342,7 @@ export default class Angle {
342342
// ---------------------------------
343343

344344
get pointsFromBezierPath() {
345-
const sketchVersion = MSApplicationMetadata.metadata().appVersion;
345+
const sketchVersion = BCSketchInfo.shared().metadata().appVersion;
346346
if (sketchVersion < 50) {
347347
let count = this.targetPath.elementCount();
348348
if (count != 7) {
@@ -512,7 +512,7 @@ export default class Angle {
512512

513513
let imageData;
514514

515-
if (MSApplicationMetadata.metadata().appVersion < 47) {
515+
if (BCSketchInfo.shared().metadata().appVersion < 47) {
516516
imageData = MSImageData.alloc().initWithImage_convertColorSpace(
517517
ouputNSImage,
518518
true

src/ShapeAngle.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default class ShapeAngle extends Angle {
88

99
this.targetLayer = this.selectedLayer;
1010

11-
const sketchVersion = MSApplicationMetadata.metadata().appVersion
11+
const sketchVersion = BCSketchInfo.shared().metadata().appVersion
1212
if (sketchVersion < 50) {
1313
this.targetPath = this.selectedLayer.bezierPath();
1414
} else if (sketchVersion < 52) {

src/SymbolicAngle.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default class SymbolicAngle extends Angle {
1212
if (this.targetLayer.class() === MSImmutableBitmapLayer)
1313
return Error.symbolWithBitMapLayer
1414

15-
const sketchVersion = MSApplicationMetadata.metadata().appVersion
15+
const sketchVersion = BCSketchInfo.shared().metadata().appVersion
1616
if (sketchVersion < 50) {
1717
this.targetPath = options.override.affectedLayer().bezierPath();
1818
} else if (sketchVersion < 52) {

src/manifest.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"bundleVersion": 1,
3-
"version": "1.1.5",
3+
"version": "1.1.6",
44
"icon": "icon.png",
55
"identifier": "io.designcode.Angle",
6-
"description": "Important note: use 1.1.5 for Sketch 66+ and 1.1.4 for Sketch 65 and earlier. Apply perspective transforms on screen mockups. Auto-detect screens by resolution and works on shapes and symbols. Super fast.",
6+
"description": "Important note: use version 1.1.6 for Sketch Sketch 72+, version 1.1.5 for Sketch 66 to Sketch 71 and 1.1.4 for Sketch 65 and earlier. Apply perspective transforms on screen mockups. Auto-detect screens by resolution and works on shapes and symbols.",
77
"homepage": "https://angle.sh",
88
"author": "Design+Code",
99
"authorEmail": "[email protected]",

0 commit comments

Comments
 (0)