Skip to content

Commit

Permalink
Merge pull request #53 from PBBB/master
Browse files Browse the repository at this point in the history
textColor 赋值使用 MSImmutableColor
  • Loading branch information
bugluo committed Dec 13, 2017
2 parents 33df053 + 79d886f commit f7d35b8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions WeSketch.sketchplugin/Contents/Sketch/colorReplace.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ function colorReplace(context) {
}
if ('#' + textcolor.hexValue() == colorToFind) {
replaceCount++;
layer.textColor = MSColor.colorWithRed_green_blue_alpha(colorToReplace.r / 255, colorToReplace.g / 255, colorToReplace.b / 255, 1.0);
layer.textColor = MSImmutableColor.colorWithRed_green_blue_alpha(colorToReplace.r / 255, colorToReplace.g / 255, colorToReplace.b / 255, 1.0);
}
}

Expand Down Expand Up @@ -269,7 +269,7 @@ function colorReplace(context) {
}

if (replaceCount) {
context.document.showMessage('替换成功,共找到' + replaceCount + '处\r\n');
context.document.showMessage('替换成功,共找到' + replaceCount + '处');
} else {
context.document.showMessage('没有找到需要替换的颜色');
}
Expand All @@ -279,4 +279,4 @@ function colorReplace(context) {

var onRun = function (context) {
colorReplace(context);
}
}

0 comments on commit f7d35b8

Please sign in to comment.