@antv/g
Advanced tools
Comparing version 2.0.7-beta.4 to 2.0.7-beta.5
@@ -195,5 +195,3 @@ var Util = require('../util/index'); | ||
context.beginPath(); | ||
if (attrs.outline) { | ||
context.lineWidth = attrs.outline.lineWidth || attrs.lineWidth * 2; | ||
context.strokeStyle = attrs.outline.stroke || attrs.outline.strokeStyle || attrs.stroke; | ||
if (self.hasStroke()) { | ||
if (textArr) { | ||
@@ -204,12 +202,2 @@ self.__drawTextArr(context, false); | ||
} | ||
// 没有定义连接方式的话会有点毛边 | ||
context.lineJoin = 'miter'; | ||
context.miterLimit = 2; | ||
context.fillStyle = attrs.outline.fill || attrs.outline.fillStyle || attrs.fill; | ||
if (textArr) { | ||
self.__drawTextArr(context, true); | ||
} else { | ||
context.fillText(text, x, y); | ||
} | ||
return; | ||
} | ||
@@ -227,10 +215,2 @@ if (self.hasFill()) { | ||
} | ||
if (self.hasStroke()) { | ||
if (textArr) { | ||
self.__drawTextArr(context, false); | ||
} else { | ||
context.strokeText(text, x, y); | ||
} | ||
} | ||
}, | ||
@@ -237,0 +217,0 @@ __drawTextArr: function __drawTextArr(context, fill) { |
{ | ||
"name": "@antv/g", | ||
"version": "2.0.7-beta.4", | ||
"version": "2.0.7-beta.5", | ||
"description": "A canvas library which providing 2d draw for G2.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -205,5 +205,3 @@ const Util = require('../util/index'); | ||
context.beginPath(); | ||
if (attrs.outline) { | ||
context.lineWidth = attrs.outline.lineWidth || attrs.lineWidth * 2; | ||
context.strokeStyle = attrs.outline.stroke || attrs.outline.strokeStyle || attrs.stroke; | ||
if (self.hasStroke()) { | ||
if (textArr) { | ||
@@ -214,12 +212,2 @@ self.__drawTextArr(context, false); | ||
} | ||
// 没有定义连接方式的话会有点毛边 | ||
context.lineJoin = 'miter'; | ||
context.miterLimit = 2; | ||
context.fillStyle = attrs.outline.fill || attrs.outline.fillStyle || attrs.fill; | ||
if (textArr) { | ||
self.__drawTextArr(context, true); | ||
} else { | ||
context.fillText(text, x, y); | ||
} | ||
return; | ||
} | ||
@@ -237,10 +225,2 @@ if (self.hasFill()) { | ||
} | ||
if (self.hasStroke()) { | ||
if (textArr) { | ||
self.__drawTextArr(context, false); | ||
} else { | ||
context.strokeText(text, x, y); | ||
} | ||
} | ||
}, | ||
@@ -247,0 +227,0 @@ __drawTextArr(context, fill) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
1051237
27317