Merge pull request #136 from bfirsh/leaky-globals

Fixed a bunch of leaking globals
This commit is contained in:
Jonathan Puckey 2012-11-22 11:43:41 -08:00
commit 1f5af06e74
3 changed files with 5 additions and 5 deletions

View file

@ -231,7 +231,7 @@ var Curve = this.Curve = Base.extend(/** @lends Curve# */{
getLength: function(/* from, to */) {
// Hide parameters from Bootstrap so it injects bean too
var from = arguments[0],
to = arguments[1];
to = arguments[1],
fullLength = arguments.length == 0 || from == 0 && to == 1;
if (fullLength && this._length != null)
return this._length;
@ -693,7 +693,7 @@ var Curve = this.Curve = Base.extend(/** @lends Curve# */{
for (var i = 0; i <= degree; i++)
w[i] = new Point(i / degree, 0);
for (k = 0; k <= degree; k++) {
for (var k = 0; k <= degree; k++) {
var lb = Math.max(0, k - n + 1),
ub = Math.min(k, n);
for (var i = lb; i <= ub; i++) {

View file

@ -1691,8 +1691,8 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{
},
cubicCurveTo: function(handle1, handle2, to) {
var _handle1 = Point.read(arguments);
_handle2 = Point.read(arguments);
var _handle1 = Point.read(arguments),
_handle2 = Point.read(arguments),
_to = Point.read(arguments);
// First modify the current segment:
var current = getCurrentSegment(this);

View file

@ -357,7 +357,7 @@ test('compare ellipse values', function() {
var shape = document.createElementNS(svgns, 'ellipse');
var cx = 100,
cy = 80,
rx = 50;
rx = 50,
ry = 30;
shape.setAttribute('cx', cx);
shape.setAttribute('cy', cy);