Skip to content

Commit

Permalink
version 52
Browse files Browse the repository at this point in the history
  • Loading branch information
bugluo committed Oct 10, 2018
1 parent 8bd74ac commit 41f2ff8
Show file tree
Hide file tree
Showing 3 changed files with 180 additions and 180 deletions.
14 changes: 7 additions & 7 deletions WeSketch.sketchplugin/Contents/Sketch/flag.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ 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);
// path = MSPath.pathWithBezierPath(path);
var flag = MSShapePathLayer.layerWithPath(MSPath.pathWithBezierPath(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));
flag.absoluteRect().setX(linexl);
Expand All @@ -130,7 +130,7 @@ function getFlag(context, refrush) {

doc.currentPage().addLayers([flag, textLayer]);
var connectionLayers = MSLayerArray.arrayWithLayers([flag, textLayer]);
connectionsGroup = MSLayerGroup.groupFromLayers(connectionLayers);
connectionsGroup = MSLayerGroup.groupWithLayers(connectionLayers);
connectionsGroup.setName(dom.objectID());
return connectionsGroup;
}
Expand All @@ -155,8 +155,8 @@ 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);
// path = MSPath.pathWithBezierPath(path);
var flag = MSShapePathLayer.layerWithPath(MSPath.pathWithBezierPath(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));
flag.absoluteRect().setX(linexr);
Expand All @@ -181,7 +181,7 @@ function getFlag(context, refrush) {

doc.currentPage().addLayers([flag, textLayer]);
var connectionLayers = MSLayerArray.arrayWithLayers([flag, textLayer]);
connectionsGroup = MSLayerGroup.groupFromLayers(connectionLayers);
connectionsGroup = MSLayerGroup.groupWithLayers(connectionLayers);
connectionsGroup.setName(dom.objectID());
return connectionsGroup;
}
Expand Down Expand Up @@ -309,7 +309,7 @@ function getFlag(context, refrush) {
}

var connectionLayers = MSLayerArray.arrayWithLayers(flags);
connectionsGroup = MSLayerGroup.groupFromLayers(connectionLayers);
connectionsGroup = MSLayerGroup.groupWithLayers(connectionLayers);
connectionsGroup.setName("___flags");
connectionsGroup.setIsLocked(1);
context.command.setValue_forKey_onLayer_forPluginIdentifier(true, "isflagContainer", connectionsGroup, kPluginDomainFlag);
Expand Down
Loading

0 comments on commit 41f2ff8

Please sign in to comment.