Rename Callback mix-in to Emitter.

This commit is contained in:
Jürg Lehni 2014-10-08 14:13:08 +02:00
parent d2c2b0a7fd
commit 3dc5c94e25
7 changed files with 9 additions and 9 deletions

View file

@ -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') {

View file

@ -19,7 +19,7 @@
*
* @private
*/
var PaperScopeItem = Base.extend(Callback, /** @lends PaperScopeItem# */{
var PaperScopeItem = Base.extend(Emitter, /** @lends PaperScopeItem# */{
/**
* Creates a PaperScopeItem object.

View file

@ -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) {

View file

@ -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');

View file

@ -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' ],

View file

@ -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' ],

View file

@ -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) {