Skip to content

Commit

Permalink
version 50
Browse files Browse the repository at this point in the history
  • Loading branch information
bugluo committed May 10, 2018
1 parent 178f900 commit 8bd74ac
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 7 deletions.
2 changes: 2 additions & 0 deletions WeSketch.sketchplugin/Contents/Sketch/flag.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ function getFlag(context, refrush) {
path.curveToPoint_controlPoint1_controlPoint2(NSMakePoint(0, 48 * scale), NSMakePoint(15.375 * scale, 36 * scale), NSMakePoint(0, 48 * scale));
path.curveToPoint_controlPoint1_controlPoint2(NSMakePoint(22 * scale, 60 * scale), NSMakePoint(0, 48 * scale), NSMakePoint(15.375 * scale, 60 * scale));
path.closePath();
path = MSPath.pathWithBezierPath(path);
var flag = MSShapeGroup.shapeWithBezierPath(path);
flag.style().addStylePartOfType(0).setColor(MSImmutableColor.colorWithRed_green_blue_alpha(colorLineR, colorLineG, colorLineB, 0.3));
flag.style().addStylePartOfType(1).setColor(MSImmutableColor.colorWithRed_green_blue_alpha(colorLineR, colorLineG, colorLineB, 1));
Expand Down Expand Up @@ -154,6 +155,7 @@ function getFlag(context, refrush) {
path.curveToPoint_controlPoint1_controlPoint2(NSMakePoint(34 * scale, 12 * scale), NSMakePoint(18.625 * scale, 0 * scale), NSMakePoint(34 * scale, 12 * scale));
path.curveToPoint_controlPoint1_controlPoint2(NSMakePoint(12 * scale, 24 * scale), NSMakePoint(34 * scale, 12 * scale), NSMakePoint(18.625 * scale, 24 * scale));
path.closePath();
path = MSPath.pathWithBezierPath(path);
var flag = MSShapeGroup.shapeWithBezierPath(path);
flag.style().addStylePartOfType(0).setColor(MSImmutableColor.colorWithRed_green_blue_alpha(colorLineR, colorLineG, colorLineB, 0.3));
flag.style().addStylePartOfType(1).setColor(MSImmutableColor.colorWithRed_green_blue_alpha(colorLineR, colorLineG, colorLineB, 1));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Miaow",
"author": "Tencent WeChat",
"version": "1.4.2",
"version": "1.4.3",
"identifier": "cn.wechat",
"description": "A set of plugins for Sketch include drawing links & marks, UI Kit & Color sync, font & text replacing",
"icon": "minicon.png",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Miaow",
"author": "Tencent WeChat",
"version": "1.4.2",
"version": "1.4.3",
"identifier": "cn.wechat",
"description": "A set of plugins for Sketch include drawing links & marks, UI Kit & Color sync, font & text replacing",
"icon": "minicon.png",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Miaow",
"author": "Tencent WeChat",
"version": "1.4.2",
"version": "1.4.3",
"identifier": "cn.wechat",
"description": "A set of plugins for Sketch include drawing links & marks, UI Kit & Color sync, font & text replacing",
"icon": "minicon.png",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Miaow",
"author": "Tencent WeChat",
"version": "1.4.2",
"version": "1.4.3",
"identifier": "cn.wechat",
"description": "A set of plugins for Sketch include drawing links & marks, UI Kit & Color sync, font & text replacing",
"icon": "minicon.png",
Expand Down
5 changes: 3 additions & 2 deletions WeSketch.sketchplugin/Contents/Sketch/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,7 @@ function getLink(context, refursh) {
}
}
}

linePath = MSPath.pathWithBezierPath(linePath);
var lineSh = MSShapeGroup.shapeWithBezierPath(linePath);
var hitAreaBorder = lineSh.style().addStylePartOfType(1);
hitAreaBorder.setColor(MSImmutableColor.colorWithIntegerRed_green_blue_alpha(colorLineLinkR, colorLineLinkG, colorLineLinkB, 255).newMutableCounterpart());
Expand All @@ -1021,6 +1021,7 @@ function getLink(context, refursh) {
var drawRound = function (x, y) {
var linkRect = NSInsetRect(NSMakeRect(x, y, 0, 0), -5, -5);
var path = NSBezierPath.bezierPathWithOvalInRect(linkRect);
path = MSPath.pathWithBezierPath(path);
var hitAreaLayer = MSShapeGroup.shapeWithBezierPath(path);
hitAreaLayer.style().addStylePartOfType(0).setColor(MSImmutableColor.colorWithIntegerRed_green_blue_alpha(colorLineLinkR, colorLineLinkG, colorLineLinkB, 76.5).newMutableCounterpart());
hitAreaLayer.style().addStylePartOfType(1).setColor(MSImmutableColor.colorWithIntegerRed_green_blue_alpha(colorLineLinkR, colorLineLinkG, colorLineLinkB, 255).newMutableCounterpart());
Expand Down Expand Up @@ -1053,7 +1054,7 @@ function getLink(context, refursh) {
arrowPath.lineToPoint(NSMakePoint(x, y));
arrowPath.lineToPoint(NSMakePoint(x - arrowOffset, y + arrowOffset));
}

arrowPath = MSPath.pathWithBezierPath(arrowPath);
var arrow = MSShapeGroup.shapeWithBezierPath(arrowPath);
var arrowStyle = arrow.style().addStylePartOfType(1);
arrowStyle.setThickness(lineThicknessLink);
Expand Down
2 changes: 1 addition & 1 deletion WeSketch.sketchplugin/Contents/Sketch/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Miaow",
"author": "Tencent WeChat",
"version": "1.4.2",
"version": "1.4.3",
"identifier": "cn.wechat",
"description": "A set of plugins for Sketch include drawing links & marks, UI Kit & Color sync, font & text replacing",
"icon": "minicon.png",
Expand Down

0 comments on commit 8bd74ac

Please sign in to comment.