From 1d37c7b76f7d02c6796a031b956bd0386e326569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Thu, 3 Mar 2011 12:25:41 +0000 Subject: [PATCH] Use 'that' variable for private instance method. --- src/path/CompoundPath.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/path/CompoundPath.js b/src/path/CompoundPath.js index 043c4ef1..de19407a 100644 --- a/src/path/CompoundPath.js +++ b/src/path/CompoundPath.js @@ -77,16 +77,15 @@ CompoundPath = PathItem.extend({ } }, new function() { - function getCurrentPath(compoundPath) { - if (compoundPath.children.length) { - return compoundPath.children[compoundPath.children.length - 1]; + function getCurrentPath(that) { + if (that.children.length) { + return that.children[that.children.length - 1]; } else { throw Error('Use a moveTo() command first'); } } var fields = { - moveBy: function() { var point = arguments.length ? Point.read(arguments) : new Point(); var path = getCurrentPath(this);