Comparing version 3.4.0-beta.7 to 3.4.0-beta.8
@@ -57,3 +57,3 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
if (animator.onFrame) { | ||
return; | ||
return animators; | ||
} | ||
@@ -170,3 +170,3 @@ | ||
Util.each(animators, function (animator) { | ||
_this.attr(animator.toAttrs); | ||
_this.attr(animator.toAttrs || animator.onFrame(1)); | ||
@@ -173,0 +173,0 @@ if (animator.toMatrix) { |
@@ -23,3 +23,3 @@ module.exports = { | ||
// version, etc. | ||
version: '3.4.0-beta.7' | ||
version: '3.4.0-beta.8' | ||
}; |
@@ -64,2 +64,3 @@ var Util = require('../util/index'); | ||
self.setSilent('tCache', null); | ||
self.setSilent('totalLength', null); | ||
self.setSilent('box', null); | ||
@@ -141,2 +142,3 @@ }, | ||
}); | ||
this._cfg.totalLength = totalLength; | ||
Util.each(curve, function (segment, i) { | ||
@@ -157,2 +159,15 @@ segmentN = curve[i + 1]; | ||
}, | ||
getTotalLength: function getTotalLength() { | ||
var totalLength = this.get('totalLength'); | ||
if (!Util.isNil(totalLength)) { | ||
return totalLength; | ||
} | ||
this._calculateCurve(); | ||
this._setTcache(); | ||
return this.get('totalLength'); | ||
}, | ||
_calculateCurve: function _calculateCurve() { | ||
@@ -159,0 +174,0 @@ var self = this; |
{ | ||
"name": "@antv/g", | ||
"version": "3.4.0-beta.7", | ||
"version": "3.4.0-beta.8", | ||
"description": "A canvas library which providing 2d draw for G2.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -41,3 +41,3 @@ const Util = require('../../util/index'); | ||
if (animator.onFrame) { | ||
return; | ||
return animators; | ||
} | ||
@@ -136,3 +136,3 @@ const delay = animator.delay; | ||
Util.each(animators, animator => { | ||
this.attr(animator.toAttrs); | ||
this.attr(animator.toAttrs || animator.onFrame(1)); | ||
if (animator.toMatrix) { | ||
@@ -139,0 +139,0 @@ this.attr('matrix', animator.toMatrix); |
@@ -23,3 +23,3 @@ module.exports = { | ||
// version, etc. | ||
version: '3.4.0-beta.7' | ||
version: '3.4.0-beta.8' | ||
}; |
@@ -59,2 +59,3 @@ const Util = require('../util/index'); | ||
self.setSilent('tCache', null); | ||
self.setSilent('totalLength', null); | ||
self.setSilent('box', null); | ||
@@ -132,2 +133,3 @@ }, | ||
}); | ||
this._cfg.totalLength = totalLength; | ||
@@ -149,2 +151,11 @@ Util.each(curve, function(segment, i) { | ||
}, | ||
getTotalLength() { | ||
const totalLength = this.get('totalLength'); | ||
if (!Util.isNil(totalLength)) { | ||
return totalLength; | ||
} | ||
this._calculateCurve(); | ||
this._setTcache(); | ||
return this.get('totalLength'); | ||
}, | ||
_calculateCurve() { | ||
@@ -151,0 +162,0 @@ const self = this; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
27719
1044013