Remove all parameters from Tool constructor, to simplify use outside PaperScript.

This commit is contained in:
Jürg Lehni 2011-07-19 23:53:13 +01:00
parent 9f1f4d334e
commit 688c1671ed
2 changed files with 6 additions and 8 deletions

View file

@ -150,15 +150,15 @@ var PaperScript = this.PaperScript = new function() {
}
}
//#endif // BROWSER
// Set currently active scope.
paper = scope;
var view = scope.view,
// TODO: Add support for multiple tools
tool = scope.tool = /on(?:Key|Mouse)(?:Up|Down|Move|Drag)/.test(code)
&& new Tool(null, scope),
&& new Tool(),
res;
// Define variables for potential handlers, so eval() calls below to
// fetch their values do not require try-catch around them.
// Set currently active scope.
paper = scope;
// Use with(){} in order to make the scope the current 'global' scope
// instead of window.
with (scope) {