added missing semicolons. Suspecting several leaking global vars, I'll investigate later
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2387 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
@@ -453,7 +453,7 @@ svgedit.history.BatchCommand.prototype.addSubCommand = function(cmd) {
|
|||||||
// Function: svgedit.history.BatchCommand.isEmpty
|
// Function: svgedit.history.BatchCommand.isEmpty
|
||||||
// Returns a boolean indicating whether or not the batch command is empty
|
// Returns a boolean indicating whether or not the batch command is empty
|
||||||
svgedit.history.BatchCommand.prototype.isEmpty = function() {
|
svgedit.history.BatchCommand.prototype.isEmpty = function() {
|
||||||
return this.stack.length == 0;
|
return this.stack.length === 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ svgedit.path.insertItemBefore = function(elem, newseg, index) {
|
|||||||
var arr = [];
|
var arr = [];
|
||||||
for (var i=0; i<len; i++) {
|
for (var i=0; i<len; i++) {
|
||||||
var cur_seg = list.getItem(i);
|
var cur_seg = list.getItem(i);
|
||||||
arr.push(cur_seg)
|
arr.push(cur_seg);
|
||||||
}
|
}
|
||||||
list.clear();
|
list.clear();
|
||||||
for (var i=0; i<len; i++) {
|
for (var i=0; i<len; i++) {
|
||||||
@@ -122,7 +122,7 @@ svgedit.path.getPointFromGrip = function(pt, path) {
|
|||||||
var out = {
|
var out = {
|
||||||
x: pt.x,
|
x: pt.x,
|
||||||
y: pt.y
|
y: pt.y
|
||||||
}
|
};
|
||||||
|
|
||||||
if (path.matrix) {
|
if (path.matrix) {
|
||||||
var pt = svgedit.math.transformPoint(out.x, out.y, path.imatrix);
|
var pt = svgedit.math.transformPoint(out.x, out.y, path.imatrix);
|
||||||
@@ -291,7 +291,7 @@ svgedit.path.replacePathSeg = function(type, index, pts, elem) {
|
|||||||
var arr = [];
|
var arr = [];
|
||||||
for (var i=0; i<len; i++) {
|
for (var i=0; i<len; i++) {
|
||||||
var cur_seg = segList.getItem(i);
|
var cur_seg = segList.getItem(i);
|
||||||
arr.push(cur_seg)
|
arr.push(cur_seg);
|
||||||
}
|
}
|
||||||
segList.clear();
|
segList.clear();
|
||||||
for (var i=0; i<len; i++) {
|
for (var i=0; i<len; i++) {
|
||||||
@@ -638,7 +638,7 @@ svgedit.path.Path.prototype.init = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
svgedit.path.Path.prototype.eachSeg = function(fn) {
|
svgedit.path.Path.prototype.eachSeg = function(fn) {
|
||||||
var len = this.segs.length
|
var len = this.segs.length;
|
||||||
for (var i=0; i < len; i++) {
|
for (var i=0; i < len; i++) {
|
||||||
var ret = fn.call(this.segs[i], i);
|
var ret = fn.call(this.segs[i], i);
|
||||||
if (ret === false) break;
|
if (ret === false) break;
|
||||||
@@ -702,7 +702,6 @@ svgedit.path.Path.prototype.deleteSeg = function(index) {
|
|||||||
var pt = [next.item.x, next.item.y];
|
var pt = [next.item.x, next.item.y];
|
||||||
svgedit.path.replacePathSeg(2, seg.next.index, pt);
|
svgedit.path.replacePathSeg(2, seg.next.index, pt);
|
||||||
list.removeItem(index);
|
list.removeItem(index);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
list.removeItem(index);
|
list.removeItem(index);
|
||||||
}
|
}
|
||||||
@@ -716,7 +715,8 @@ svgedit.path.Path.prototype.subpathIsClosed = function(index) {
|
|||||||
if (this.type === 2) {
|
if (this.type === 2) {
|
||||||
// Found M first, so open
|
// Found M first, so open
|
||||||
return false;
|
return false;
|
||||||
} else if(this.type === 1) {
|
}
|
||||||
|
if (this.type === 1) {
|
||||||
// Found Z first, so closed
|
// Found Z first, so closed
|
||||||
closed = true;
|
closed = true;
|
||||||
return false;
|
return false;
|
||||||
@@ -736,7 +736,7 @@ svgedit.path.Path.prototype.removePtFromSelection = function(index) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
svgedit.path.Path.prototype.clearSelection = function() {
|
svgedit.path.Path.prototype.clearSelection = function() {
|
||||||
this.eachSeg(function(i) {
|
this.eachSeg(function() {
|
||||||
// 'this' is the segment here
|
// 'this' is the segment here
|
||||||
this.select(false);
|
this.select(false);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user