mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-07-26 21:59:46 -04:00
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 #27
This commit is contained in:
parent
2d5788540d
commit
fe97b94340
6 changed files with 139 additions and 64 deletions
src/core
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue