mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
Fixed leaked globals.
Detected using QUnit's "Check for Globals" feature!
This commit is contained in:
parent
4ad8875a8c
commit
10fb616665
2 changed files with 2 additions and 2 deletions
|
@ -132,7 +132,7 @@ PathItem.inject(new function() {
|
||||||
for (var j = 0; j < 3; j++) {
|
for (var j = 0; j < 3; j++) {
|
||||||
// Try the points at 1/4, 2/4 and 3/4 of the total length:
|
// Try the points at 1/4, 2/4 and 3/4 of the total length:
|
||||||
var length = totalLength * (j + 1) / 4;
|
var length = totalLength * (j + 1) / 4;
|
||||||
for (k = 0, m = chain.length; k < m; k++) {
|
for (var k = 0, m = chain.length; k < m; k++) {
|
||||||
var node = chain[k],
|
var node = chain[k],
|
||||||
curveLength = node.length;
|
curveLength = node.length;
|
||||||
if (length <= curveLength) {
|
if (length <= curveLength) {
|
||||||
|
|
|
@ -128,7 +128,7 @@ new function() {
|
||||||
if (segments.length >= 3) {
|
if (segments.length >= 3) {
|
||||||
type = item._closed ? 'polygon' : 'polyline';
|
type = item._closed ? 'polygon' : 'polyline';
|
||||||
var parts = [];
|
var parts = [];
|
||||||
for(i = 0, l = segments.length; i < l; i++)
|
for(var i = 0, l = segments.length; i < l; i++)
|
||||||
parts.push(formatter.point(segments[i]._point));
|
parts.push(formatter.point(segments[i]._point));
|
||||||
attrs.points = parts.join(' ');
|
attrs.points = parts.join(' ');
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue