@antv/g-svg
Advanced tools
Comparing version 0.3.2 to 0.3.3
@@ -26,3 +26,13 @@ /** | ||
_setTcache(): void; | ||
/** | ||
* Get start tangent vector | ||
* @return {Array} | ||
*/ | ||
getStartTangent(): number[][]; | ||
/** | ||
* Get end tangent vector | ||
* @return {Array} | ||
*/ | ||
getEndTangent(): number[][]; | ||
} | ||
export default Polyline; |
@@ -101,2 +101,25 @@ import { __extends } from "tslib"; | ||
}; | ||
/** | ||
* Get start tangent vector | ||
* @return {Array} | ||
*/ | ||
Polyline.prototype.getStartTangent = function () { | ||
var points = this.attr().points; | ||
var result = []; | ||
result.push([points[1][0], points[1][1]]); | ||
result.push([points[0][0], points[0][1]]); | ||
return result; | ||
}; | ||
/** | ||
* Get end tangent vector | ||
* @return {Array} | ||
*/ | ||
Polyline.prototype.getEndTangent = function () { | ||
var points = this.attr().points; | ||
var l = points.length - 1; | ||
var result = []; | ||
result.push([points[l - 1][0], points[l - 1][1]]); | ||
result.push([points[l][0], points[l][1]]); | ||
return result; | ||
}; | ||
return Polyline; | ||
@@ -103,0 +126,0 @@ }(ShapeBase)); |
@@ -26,3 +26,13 @@ /** | ||
_setTcache(): void; | ||
/** | ||
* Get start tangent vector | ||
* @return {Array} | ||
*/ | ||
getStartTangent(): number[][]; | ||
/** | ||
* Get end tangent vector | ||
* @return {Array} | ||
*/ | ||
getEndTangent(): number[][]; | ||
} | ||
export default Polyline; |
@@ -103,2 +103,25 @@ "use strict"; | ||
}; | ||
/** | ||
* Get start tangent vector | ||
* @return {Array} | ||
*/ | ||
Polyline.prototype.getStartTangent = function () { | ||
var points = this.attr().points; | ||
var result = []; | ||
result.push([points[1][0], points[1][1]]); | ||
result.push([points[0][0], points[0][1]]); | ||
return result; | ||
}; | ||
/** | ||
* Get end tangent vector | ||
* @return {Array} | ||
*/ | ||
Polyline.prototype.getEndTangent = function () { | ||
var points = this.attr().points; | ||
var l = points.length - 1; | ||
var result = []; | ||
result.push([points[l - 1][0], points[l - 1][1]]); | ||
result.push([points[l][0], points[l][1]]); | ||
return result; | ||
}; | ||
return Polyline; | ||
@@ -105,0 +128,0 @@ }(base_1.default)); |
{ | ||
"name": "@antv/g-svg", | ||
"version": "0.3.2", | ||
"version": "0.3.3", | ||
"description": "A canvas library which providing 2d", | ||
@@ -57,4 +57,4 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@antv/g-base": "^0.3.2", | ||
"@antv/g-math": "^0.1.0", | ||
"@antv/g-base": "^0.3.3", | ||
"@antv/g-math": "^0.1.1", | ||
"@antv/util": "~2.0.0", | ||
@@ -64,3 +64,3 @@ "detect-browser": "^4.6.0" | ||
"__npminstall_done": false, | ||
"gitHead": "fc50f934c810a79dd364a9bad34df90ec26a8e10" | ||
"gitHead": "949297a2bb04fc59f267fdbc17f924113c7df124" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
887808
5595
Updated@antv/g-base@^0.3.3
Updated@antv/g-math@^0.1.1