mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 06:00:56 -05:00
Rename Callback mix-in to Emitter.
This commit is contained in:
parent
d2c2b0a7fd
commit
3dc5c94e25
7 changed files with 9 additions and 9 deletions
|
@ -11,11 +11,11 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* @name Callback
|
||||
* @name Emitter
|
||||
* @namespace
|
||||
* @private
|
||||
*/
|
||||
var Callback = {
|
||||
var Emitter = {
|
||||
attach: function(type, func) {
|
||||
// If an object literal is passed, attach all callbacks defined in it
|
||||
if (typeof type !== 'string') {
|
|
@ -19,7 +19,7 @@
|
|||
*
|
||||
* @private
|
||||
*/
|
||||
var PaperScopeItem = Base.extend(Callback, /** @lends PaperScopeItem# */{
|
||||
var PaperScopeItem = Base.extend(Emitter, /** @lends PaperScopeItem# */{
|
||||
|
||||
/**
|
||||
* Creates a PaperScopeItem object.
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
* is unique to their type, but share the underlying properties and functions
|
||||
* that they inherit from Item.
|
||||
*/
|
||||
var Item = Base.extend(Callback, /** @lends Item# */{
|
||||
var Item = Base.extend(Emitter, /** @lends Item# */{
|
||||
statics: {
|
||||
/**
|
||||
* Override Item.extend() to merge the subclass' _serializeFields with
|
||||
|
@ -1230,7 +1230,7 @@ var Item = Base.extend(Callback, /** @lends Item# */{
|
|||
},
|
||||
|
||||
/**
|
||||
* Overrides Callback#_installEvents to also call _installEvents on all
|
||||
* Overrides Emitter#_installEvents to also call _installEvents on all
|
||||
* children.
|
||||
*/
|
||||
_installEvents: function _installEvents(install) {
|
||||
|
|
|
@ -49,7 +49,7 @@ var paper = new function(undefined) {
|
|||
/*#*/ }
|
||||
|
||||
/*#*/ include('core/Base.js');
|
||||
/*#*/ include('core/Callback.js');
|
||||
/*#*/ include('core/Emitter.js');
|
||||
/*#*/ include('core/PaperScope.js');
|
||||
/*#*/ include('core/PaperScopeItem.js');
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* @name Component
|
||||
* @class
|
||||
*/
|
||||
var Component = Base.extend(Callback, /** @lends Component# */{
|
||||
var Component = Base.extend(Emitter, /** @lends Component# */{
|
||||
_class: 'Component',
|
||||
_events: [ 'onChange', 'onClick' ],
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* @name Palette
|
||||
* @class
|
||||
*/
|
||||
var Palette = Base.extend(Callback, /** @lends Palette# */{
|
||||
var Palette = Base.extend(Emitter, /** @lends Palette# */{
|
||||
_class: 'Palette',
|
||||
_events: [ 'onChange' ],
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
* center, both useful for constructing artwork that should appear centered on
|
||||
* screen.
|
||||
*/
|
||||
var View = Base.extend(Callback, /** @lends View# */{
|
||||
var View = Base.extend(Emitter, /** @lends View# */{
|
||||
_class: 'View',
|
||||
|
||||
initialize: function View(project, element) {
|
||||
|
|
Loading…
Reference in a new issue