Comparing version 2.0.5 to 2.0.6
@@ -5,8 +5,2 @@ var Util = require('./util/index'); | ||
function requestAnimationFrame(fn) { | ||
var method = window.requestAnimationFrame || window.webkitRequestAnimationFrame || function (fn) { | ||
return setTimeout(fn, 16); | ||
}; | ||
return method(fn); | ||
} | ||
var Canvas = function Canvas(cfg) { | ||
@@ -312,3 +306,3 @@ Canvas.superclass.constructor.call(this, cfg); | ||
function drawInner() { | ||
self.setSilent('animateHandler', requestAnimationFrame(function () { | ||
self.setSilent('animateHandler', Util.requestAnimationFrame(function () { | ||
self.setSilent('animateHandler', undefined); | ||
@@ -315,0 +309,0 @@ if (self.get('toDraw')) { |
@@ -145,7 +145,8 @@ var Util = require('../../util/index'); | ||
this.endPoint = point; | ||
if (this.isLast) { | ||
this.endTangent = function () { | ||
return [point.x - preEndPoint.x, point.y - preEndPoint.y]; | ||
}; | ||
} | ||
this.endTangent = function () { | ||
return [point.x - preEndPoint.x, point.y - preEndPoint.y]; | ||
}; | ||
this.startTangent = function () { | ||
return [preEndPoint.x - point.x, preEndPoint.y - point.y]; | ||
}; | ||
break; | ||
@@ -168,2 +169,5 @@ case 'H': | ||
}; | ||
this.startTangent = function () { | ||
return [preEndPoint.x - point.x, preEndPoint.y - point.y]; | ||
}; | ||
break; | ||
@@ -186,2 +190,5 @@ case 'V': | ||
}; | ||
this.startTangent = function () { | ||
return [preEndPoint.x - point.x, preEndPoint.y - point.y]; | ||
}; | ||
break; | ||
@@ -209,2 +216,5 @@ case 'Q': | ||
}; | ||
this.startTangent = function () { | ||
return [preEndPoint.x - point1.x, preEndPoint.y - point1.y]; | ||
}; | ||
break; | ||
@@ -229,2 +239,5 @@ case 'T': | ||
}; | ||
this.startTangent = function () { | ||
return [preEndPoint.x - point1.x, preEndPoint.y - point1.y]; | ||
}; | ||
} else { | ||
@@ -238,2 +251,5 @@ this.command = 'TL'; | ||
}; | ||
this.startTangent = function () { | ||
return [preEndPoint.x - point2.x, preEndPoint.y - point2.y]; | ||
}; | ||
} | ||
@@ -268,2 +284,5 @@ | ||
}; | ||
this.startTangent = function () { | ||
return [preEndPoint.x - point1.x, preEndPoint.y - point1.y]; | ||
}; | ||
break; | ||
@@ -293,2 +312,5 @@ case 'S': | ||
}; | ||
this.startTangent = function () { | ||
return [preEndPoint.x - point1.x, preEndPoint.y - point1.y]; | ||
}; | ||
} else { | ||
@@ -302,2 +324,5 @@ this.command = 'SQ'; | ||
}; | ||
this.startTangent = function () { | ||
return [preEndPoint.x - point2.x, preEndPoint.y - point2.y]; | ||
}; | ||
} | ||
@@ -304,0 +329,0 @@ break; |
@@ -76,3 +76,5 @@ var Util = require('./common'); | ||
container.innerHTML = '' + str; | ||
return container.childNodes[0]; | ||
var dom = container.childNodes[0]; | ||
container.removeChild(dom); | ||
return dom; | ||
}, | ||
@@ -79,0 +81,0 @@ getRatio: function getRatio() { |
{ | ||
"name": "@antv/g", | ||
"version": "2.0.5", | ||
"version": "2.0.6", | ||
"description": "A canvas library which providing 2d draw for G2.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -5,8 +5,2 @@ const Util = require('./util/index'); | ||
function requestAnimationFrame(fn) { | ||
const method = window.requestAnimationFrame || window.webkitRequestAnimationFrame || function(fn) { | ||
return setTimeout(fn, 16); | ||
}; | ||
return method(fn); | ||
} | ||
const Canvas = function(cfg) { | ||
@@ -311,3 +305,3 @@ Canvas.superclass.constructor.call(this, cfg); | ||
function drawInner() { | ||
self.setSilent('animateHandler', requestAnimationFrame(() => { | ||
self.setSilent('animateHandler', Util.requestAnimationFrame(() => { | ||
self.setSilent('animateHandler', undefined); | ||
@@ -314,0 +308,0 @@ if (self.get('toDraw')) { |
@@ -142,7 +142,8 @@ const Util = require('../../util/index'); | ||
this.endPoint = point; | ||
if (this.isLast) { | ||
this.endTangent = function() { | ||
return [ point.x - preEndPoint.x, point.y - preEndPoint.y ]; | ||
}; | ||
} | ||
this.endTangent = function() { | ||
return [ point.x - preEndPoint.x, point.y - preEndPoint.y ]; | ||
}; | ||
this.startTangent = function() { | ||
return [ preEndPoint.x - point.x, preEndPoint.y - point.y ]; | ||
}; | ||
break; | ||
@@ -165,2 +166,5 @@ case 'H': | ||
}; | ||
this.startTangent = function() { | ||
return [ preEndPoint.x - point.x, preEndPoint.y - point.y ]; | ||
}; | ||
break; | ||
@@ -183,2 +187,5 @@ case 'V': | ||
}; | ||
this.startTangent = function() { | ||
return [ preEndPoint.x - point.x, preEndPoint.y - point.y ]; | ||
}; | ||
break; | ||
@@ -206,2 +213,5 @@ case 'Q': | ||
}; | ||
this.startTangent = function() { | ||
return [ preEndPoint.x - point1.x, preEndPoint.y - point1.y ]; | ||
}; | ||
break; | ||
@@ -226,2 +236,5 @@ case 'T': | ||
}; | ||
this.startTangent = function() { | ||
return [ preEndPoint.x - point1.x, preEndPoint.y - point1.y ]; | ||
}; | ||
} else { | ||
@@ -235,2 +248,5 @@ this.command = 'TL'; | ||
}; | ||
this.startTangent = function() { | ||
return [ preEndPoint.x - point2.x, preEndPoint.y - point2.y ]; | ||
}; | ||
} | ||
@@ -265,2 +281,5 @@ | ||
}; | ||
this.startTangent = function() { | ||
return [ preEndPoint.x - point1.x, preEndPoint.y - point1.y ]; | ||
}; | ||
break; | ||
@@ -290,2 +309,5 @@ case 'S': | ||
}; | ||
this.startTangent = function() { | ||
return [ preEndPoint.x - point1.x, preEndPoint.y - point1.y ]; | ||
}; | ||
} else { | ||
@@ -299,2 +321,5 @@ this.command = 'SQ'; | ||
}; | ||
this.startTangent = function() { | ||
return [ preEndPoint.x - point2.x, preEndPoint.y - point2.y ]; | ||
}; | ||
} | ||
@@ -301,0 +326,0 @@ break; |
@@ -74,3 +74,5 @@ const Util = require('./common'); | ||
container.innerHTML = '' + str; | ||
return container.childNodes[0]; | ||
const dom = container.childNodes[0]; | ||
container.removeChild(dom); | ||
return dom; | ||
}, | ||
@@ -77,0 +79,0 @@ getRatio() { |
Sorry, the diff of this file is not supported yet
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
27100
1042349