Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions Sketch Measure.sketchplugin/Contents/Sketch/library/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -3107,13 +3107,18 @@ SM.extend({
layerStates = this.getStates(layer);

if(layer && this.is(layer, MSLayerGroup) && /NOTE\#/.exec(layer.name())){
var textLayer = layer.children()[2];

data.notes.push({
rect: this.rectToJSON(textLayer.absoluteRect(), artboardRect),
note: this.toHTMLEncode(this.emojiToEntities(textLayer.stringValue())).replace(/\n/g, "<br>")
});
layer.setIsVisible(false);
//fix the note stuck issue on Sketch 60+
for(let i=0; i<layer.containedLayersCount(); i++){
childLayer = layer.layerAtIndex(i);
if (this.is(childLayer, MSTextLayer)) {
data.notes.push({
rect: this.rectToJSON(childLayer.absoluteRect(), artboardRect),
note: this.toHTMLEncode(this.emojiToEntities(childLayer.stringValue())).replace(/\n/g, "<br>")
});
layer.setIsVisible(false);
break;
}
}
}

if (
Expand Down
2 changes: 1 addition & 1 deletion appcast.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<description>
<![CDATA[
<ul>
<li>Support Sketch v52</li>
<li>Support Sketch v62</li>
</ul>
]]>
</description>
Expand Down