Skip to content

Commit

Permalink
v56
Browse files Browse the repository at this point in the history
The waiting is finally over! More than 50k designers’ expectations, the
Sketch Measure updated!
  • Loading branch information
utom committed Jul 26, 2019
1 parent 2bd89e4 commit 6377f18
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
<div id="app" class="container">
<div class="options" style="height:194px">
<div class="resolution selectbox mrb16" tabindex="0">
<div class="selectwrap" @click="blurSelectbox">
<h3>Design resolution</h3>
<div class="selectwrap">
<h3 @click="blurSelectbox">Design resolution</h3>
<p>{{ checkedResolution() }}</p>
<ul>
<template v-for="item in resolutionData">
<li v-if="!item.ico">
<label><input type="radio" name="resolution-type" :checked="item.scale==configs.scale && item.units.join('/') == configs.units" :value="JSON.stringify(item)" @click="setConfigs({scale: item.scale, units: item.units.join('/')})"><span>{{ item.name }}</span></label>
<label><input type="radio" name="resolution-type" :checked="item.scale==configs.scale && item.units.join('/') == configs.units" :value="JSON.stringify(item)" @click="setConfigs({scale: item.scale, units: item.units.join('/')});blurSelectbox();"><span>{{ item.name }}</span></label>
</li>
<li v-else class="sub-title">{{ item.name }}</li>
</template>
Expand All @@ -35,11 +35,11 @@ <h3>Design resolution</h3>
</div>
<h3 class="title">Color format</h3>
<div class="color-format selectbox" tabindex="0">
<div class="selectwrap" @click="blurSelectbox">
<h3>Color format</h3>
<div class="selectwrap">
<h3 @click="blurSelectbox">Color format</h3>
<p>{{ checkedFormat() }}</p>
<ul>
<li v-for="item in formatData" @click="setConfigs({format: item.value})"><label><input type="radio" name="format" :value="item.value" :checked="configs.format == item.value"><span>{{ item.name }}</span><i>{{ item.example }}</i></label></li>
<li v-for="item in formatData" @click="setConfigs({format: item.value});blurSelectbox();"><label><input type="radio" name="format" :value="item.value" :checked="configs.format == item.value"><span>{{ item.name }}</span><i>{{ item.example }}</i></label></li>
</ul>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>18A391</string>
<string>18F132</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
Expand All @@ -27,17 +27,17 @@
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>10A255</string>
<string>10E1001</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>18A384</string>
<string>18E219</string>
<key>DTSDKName</key>
<string>macosx10.14</string>
<key>DTXcode</key>
<string>1000</string>
<string>1020</string>
<key>DTXcodeBuild</key>
<string>10A255</string>
<string>10E1001</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2017 UTOMBOX. All rights reserved.</string>
</dict>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>18A391</string>
<string>18F132</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
Expand All @@ -27,17 +27,17 @@
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>10A255</string>
<string>10E1001</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>18A384</string>
<string>18E219</string>
<key>DTSDKName</key>
<string>macosx10.14</string>
<key>DTXcode</key>
<string>1000</string>
<string>1020</string>
<key>DTXcodeBuild</key>
<string>10A255</string>
<string>10E1001</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2017 UTOMBOX. All rights reserved.</string>
</dict>
Expand Down
Binary file not shown.
31 changes: 19 additions & 12 deletions Sketch Measure.sketchplugin/Contents/Sketch/library/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -1428,7 +1428,7 @@ SM.extend({
});

this.removeLayer(temp);
container.resizeToFitChildrenWithOption(0);
container.fixGeometryWithOptions(0);
},
spacings: function( options ){
var options = this.extend(options, {}),
Expand Down Expand Up @@ -1565,7 +1565,7 @@ SM.extend({
overlayRect.setWidth(targetRect.width);
overlayRect.setHeight(targetRect.height);

container.resizeToFitChildrenWithOption(0);
container.fixGeometryWithOptions(0);
}
});

Expand Down Expand Up @@ -1713,7 +1713,7 @@ SM.extend({

this.setConfigs({placement: placement}, container);

container.resizeToFitChildrenWithOption(0);
container.fixGeometryWithOptions(0);
}
});

Expand Down Expand Up @@ -2007,7 +2007,7 @@ SM.extend({
noteRect.setWidth(textRect.width + 12 * scale);
noteRect.setHeight(textRect.height + 12 * scale);

container.resizeToFitChildrenWithOption(0);
container.fixGeometryWithOptions(0);
this.removeLayer(target);
}
});
Expand Down Expand Up @@ -2082,7 +2082,7 @@ SM.extend({
text.setTextBehaviour(1);
text.setTextBehaviour(0);

container.resizeToFitChildrenWithOption(0);
container.fixGeometryWithOptions(0);
},
resizeNote: function(container) {
var text = this.find({key: "(class != NULL) && (class == %@)", match: MSTextLayer}),
Expand All @@ -2109,7 +2109,7 @@ SM.extend({
text.setTextBehaviour(1);
text.setTextBehaviour(0);

container.resizeToFitChildrenWithOption(0);
container.fixGeometryWithOptions(0);
}
});

Expand Down Expand Up @@ -2398,7 +2398,8 @@ SM.extend({
hasSlice = false,
isEmpty = false,
isMaskChildLayer = false,
isMeasure = false;
isMeasure = false,
isShapeGroup = false;

while (!( this.is(layer, MSArtboardGroup) || this.is(layer, MSSymbolMaster) ) ) {
var group = layer.parentGroup();
Expand All @@ -2407,6 +2408,10 @@ SM.extend({
isMeasure = true;
}

if( this.is(group, MSShapeGroup) ){
isShapeGroup = true;
}

if (!layer.isVisible()) {
isVisible = false;
}
Expand Down Expand Up @@ -2442,7 +2447,8 @@ SM.extend({
hasSlice: hasSlice,
isMaskChildLayer: isMaskChildLayer,
isMeasure: isMeasure,
isEmpty: isEmpty
isEmpty: isEmpty,
isShapeGroup: isShapeGroup
}
},
getMask: function(group, layer, layerData, layerStates){
Expand Down Expand Up @@ -2612,9 +2618,7 @@ SM.extend({
var symbolRect = this.getRect(layer),
symbolChildren = layer.symbolMaster().children(),
tempSymbol = layer.duplicate(),
tempGroup = tempSymbol.detachByReplacingWithGroup();

tempGroup.resizeToFitChildrenWithOption(0)
tempGroup = tempSymbol.detachStylesAndReplaceWithGroupRecursively(false);

var tempSymbolLayers = tempGroup.children().objectEnumerator(),
overrides = layer.overrides(),
Expand Down Expand Up @@ -2947,6 +2951,7 @@ SM.extend({
self.wantsStop = true;
log(e)
processing.evaluateWebScript("$('#processing-text').html('<small>" + self.toHTMLEncode(message) + "</small>');");
if(ga) ga.sendError(message)
}

if( layerIndex >= artboard.children().length ){
Expand Down Expand Up @@ -3033,6 +3038,7 @@ SM.extend({
}

if( self.wantsStop === true ){
if(ga) ga.sendEvent('spec', 'spec done');
return interval.cancel();
}

Expand Down Expand Up @@ -3116,7 +3122,8 @@ SM.extend({
( layerStates.isLocked && !this.is(layer, MSSliceLayer) ) ||
layerStates.isEmpty ||
layerStates.hasSlice ||
layerStates.isMeasure
layerStates.isMeasure ||
layerStates.isShapeGroup
){
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
"identifier": "com.utom.measure",
"appcast": "https://raw.githubusercontent.com/utom/sketch-measure/master/appcast.xml",
"homepage": "http://utom.design/measure/",
"version": "2.7.7",
"version": "2.8.1",
"description" : "Make it a fun to create spec for developers and teammates",
"authorEmail" : "utombox@gmail.com",
"name" : "Sketch Measure"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
"identifier": "com.utom.measure",
"appcast": "https://raw.githubusercontent.com/utom/sketch-measure/master/appcast.xml",
"homepage": "http://utom.design/measure/",
"version": "2.7.7",
"version": "2.8.1",
"description" : "Make it a fun to create spec for developers and teammates",
"authorEmail" : "utombox@gmail.com",
"name" : "Sketch Measure"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
"identifier": "com.utom.measure",
"appcast": "https://raw.githubusercontent.com/utom/sketch-measure/master/appcast.xml",
"homepage": "http://utom.design/measure/",
"version": "2.7.7",
"version": "2.8.1",
"description" : "Make it a fun to create spec for developers and teammates",
"authorEmail" : "utombox@gmail.com",
"name" : "Sketch Measure"
Expand Down
2 changes: 1 addition & 1 deletion Sketch Measure.sketchplugin/Contents/Sketch/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
"identifier": "com.utom.measure",
"appcast": "https://raw.githubusercontent.com/utom/sketch-measure/master/appcast.xml",
"homepage": "http://utom.design/measure/",
"version": "2.7.7",
"version": "2.8.1",
"description" : "Make it a fun to create spec for developers and teammates",
"authorEmail" : "utombox@gmail.com",
"name" : "Sketch Measure"
Expand Down
6 changes: 3 additions & 3 deletions appcast.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Sketch Measure</title>
<link>http://utom.design/measure/appcast.xml</link>
<link>https://raw.githubusercontent.com/utom/sketch-measure/master/appcast.xml</link>
<description>Make it a fun to create spec for developers and teammates</description>
<language>en</language>
<item>
<title>Version 2.7.7</title>
<title>Version 2.8.1</title>
<description>
<![CDATA[
<ul>
<li>Support Sketch v52</li>
</ul>
]]>
</description>
<enclosure url="https://github.com/utom/sketch-measure/archive/master.zip" sparkle:version="2.7.7" type="application/octet-stream" />
<enclosure url="https://github.com/utom/sketch-measure/archive/master.zip" sparkle:version="2.8.1" type="application/octet-stream" />
</item>
</channel>
</rss>

0 comments on commit 6377f18

Please sign in to comment.