Define PaperScopeItem as a private base class for all classes that have lists and references in the PaperScope (Project, View, Tool), so they can share functionality (#initialize(), #activate(), #remove()), and add support for multiple tools. Closes

This commit is contained in:
Jürg Lehni 2011-08-02 10:08:08 +01:00
parent 2d5788540d
commit fe97b94340
6 changed files with 139 additions and 64 deletions

View file

@ -156,8 +156,7 @@ var PaperScript = this.PaperScript = new function() {
// 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)
tool = /on(?:Key|Mouse)(?:Up|Down|Move|Drag)/.test(code)
&& new Tool(),
res;
// Define variables for potential handlers, so eval() calls below to