mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Use 'that' variable for private instance method.
This commit is contained in:
parent
26ebe2f2c0
commit
1d37c7b76f
1 changed files with 3 additions and 4 deletions
|
@ -77,16 +77,15 @@ CompoundPath = PathItem.extend({
|
||||||
}
|
}
|
||||||
}, new function() {
|
}, new function() {
|
||||||
|
|
||||||
function getCurrentPath(compoundPath) {
|
function getCurrentPath(that) {
|
||||||
if (compoundPath.children.length) {
|
if (that.children.length) {
|
||||||
return compoundPath.children[compoundPath.children.length - 1];
|
return that.children[that.children.length - 1];
|
||||||
} else {
|
} else {
|
||||||
throw Error('Use a moveTo() command first');
|
throw Error('Use a moveTo() command first');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var fields = {
|
var fields = {
|
||||||
|
|
||||||
moveBy: function() {
|
moveBy: function() {
|
||||||
var point = arguments.length ? Point.read(arguments) : new Point();
|
var point = arguments.length ? Point.read(arguments) : new Point();
|
||||||
var path = getCurrentPath(this);
|
var path = getCurrentPath(this);
|
||||||
|
|
Loading…
Reference in a new issue