mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-29 09:22:22 -05:00
Clean up event related comments, to reflect recent renaming.
This commit is contained in:
parent
68585276a0
commit
3b2a82047e
5 changed files with 19 additions and 30 deletions
|
@ -408,7 +408,7 @@ Base.exports.PaperScript = (function() {
|
|||
if (view) {
|
||||
if (res.onResize)
|
||||
view.setOnResize(res.onResize);
|
||||
// Fire resize event directly, so any user
|
||||
// Emit resize event directly, so any user
|
||||
// defined resize handlers are called.
|
||||
view.emit('resize', {
|
||||
size: view.size,
|
||||
|
|
|
@ -3524,8 +3524,7 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
|||
/**
|
||||
* Detach an event handler from the item.
|
||||
*
|
||||
* @name Item#detach
|
||||
* @alias Item#off
|
||||
* @name Item#off
|
||||
* @function
|
||||
* @param {String('mousedown', 'mouseup', 'mousedrag', 'click',
|
||||
* 'doubleclick', 'mousemove', 'mouseenter', 'mouseleave')} type the event
|
||||
|
@ -3535,8 +3534,7 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
|||
/**
|
||||
* Detach one or more event handlers to the item.
|
||||
*
|
||||
* @name Item#detach
|
||||
* @alias Item#off
|
||||
* @name Item#off
|
||||
* @function
|
||||
* @param {Object} object an object literal containing one or more of the
|
||||
* following properties: {@code mousedown, mouseup, mousedrag, click,
|
||||
|
@ -3544,10 +3542,9 @@ var Item = Base.extend(Emitter, /** @lends Item# */{
|
|||
*/
|
||||
|
||||
/**
|
||||
* Fire an event on the item.
|
||||
* Emit an event on the item.
|
||||
*
|
||||
* @name Item#fire
|
||||
* @alias Item#trigger
|
||||
* @name Item#emit
|
||||
* @function
|
||||
* @param {String('mousedown', 'mouseup', 'mousedrag', 'click',
|
||||
* 'doubleclick', 'mousemove', 'mouseenter', 'mouseleave')} type the event
|
||||
|
|
|
@ -324,8 +324,8 @@ var Raster = Item.extend(/** @lends Raster# */{
|
|||
// IE has naturalWidth / Height defined, but width / height set to 0
|
||||
// when the image is invisible in the document.
|
||||
if (image.naturalWidth && image.naturalHeight) {
|
||||
// Fire load event delayed, so behavior is the same as when it's
|
||||
// actually loaded and we give the code time to install event
|
||||
// Emit load event with a delay, so behavior is the same as when
|
||||
// it's actually loaded and we give the code time to install event.
|
||||
setTimeout(loaded, 0);
|
||||
} else {
|
||||
// Trigger the onLoad event on the image once it's loaded
|
||||
|
@ -345,8 +345,8 @@ var Raster = Item.extend(/** @lends Raster# */{
|
|||
// Preserve the data in this._data since canvas-node eats it.
|
||||
// TODO: Fix canvas-node instead
|
||||
image.src = this._data = src;
|
||||
// Fire load event delayed, so behavior is the same as when it's
|
||||
// actually loaded and we give the code time to install event
|
||||
// Emit load event with a delay, so behavior is the same as when
|
||||
// it's actually loaded and we give the code time to install event.
|
||||
setTimeout(loaded, 0);
|
||||
} else if (/^https?:\/\//.test(src)) {
|
||||
// Load it from remote location:
|
||||
|
|
|
@ -411,8 +411,7 @@ var Tool = PaperScopeItem.extend(/** @lends Tool# */{
|
|||
*
|
||||
* Attach an event handler to the tool.
|
||||
*
|
||||
* @name Tool#attach
|
||||
* @alias Tool#on
|
||||
* @name Tool#on
|
||||
* @function
|
||||
* @param {String('mousedown', 'mouseup', 'mousedrag', 'mousemove',
|
||||
* 'keydown', 'keyup')} type the event type
|
||||
|
@ -422,8 +421,7 @@ var Tool = PaperScopeItem.extend(/** @lends Tool# */{
|
|||
/**
|
||||
* Attach one or more event handlers to the tool.
|
||||
*
|
||||
* @name Tool#attach
|
||||
* @alias Tool#on
|
||||
* @name Tool#on
|
||||
* @function
|
||||
* @param {Object} param an object literal containing one or more of the
|
||||
* following properties: {@code mousedown, mouseup, mousedrag, mousemove,
|
||||
|
@ -433,8 +431,7 @@ var Tool = PaperScopeItem.extend(/** @lends Tool# */{
|
|||
/**
|
||||
* Detach an event handler from the tool.
|
||||
*
|
||||
* @name Tool#detach
|
||||
* @alias Tool#off
|
||||
* @name Tool#off
|
||||
* @function
|
||||
* @param {String('mousedown', 'mouseup', 'mousedrag', 'mousemove',
|
||||
* 'keydown', 'keyup')} type the event type
|
||||
|
@ -443,8 +440,7 @@ var Tool = PaperScopeItem.extend(/** @lends Tool# */{
|
|||
/**
|
||||
* Detach one or more event handlers from the tool.
|
||||
*
|
||||
* @name Tool#detach
|
||||
* @alias Tool#off
|
||||
* @name Tool#off
|
||||
* @function
|
||||
* @param {Object} param an object literal containing one or more of the
|
||||
* following properties: {@code mousedown, mouseup, mousedrag, mousemove,
|
||||
|
@ -452,10 +448,9 @@ var Tool = PaperScopeItem.extend(/** @lends Tool# */{
|
|||
*/
|
||||
|
||||
/**
|
||||
* Fire an event on the tool.
|
||||
* Emit an event on the tool.
|
||||
*
|
||||
* @name Tool#fire
|
||||
* @alias Tool#trigger
|
||||
* @name Tool#emit
|
||||
* @function
|
||||
* @param {String('mousedown', 'mouseup', 'mousedrag', 'mousemove',
|
||||
* 'keydown', 'keyup')} type the event type
|
||||
|
|
|
@ -605,8 +605,7 @@ var View = Base.extend(Emitter, /** @lends View# */{
|
|||
/**
|
||||
* Detach an event handler from the view.
|
||||
*
|
||||
* @name View#detach
|
||||
* @alias View#off
|
||||
* @name View#off
|
||||
* @function
|
||||
* @param {String('frame', 'resize')} type the event type
|
||||
* @param {Function} function The function to be detached
|
||||
|
@ -635,18 +634,16 @@ var View = Base.extend(Emitter, /** @lends View# */{
|
|||
/**
|
||||
* Detach one or more event handlers from the view.
|
||||
*
|
||||
* @name View#detach
|
||||
* @alias View#off
|
||||
* @name View#off
|
||||
* @function
|
||||
* @param {Object} param an object literal containing one or more of the
|
||||
* following properties: {@code frame, resize}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Fire an event on the view.
|
||||
* Emit an event on the view.
|
||||
*
|
||||
* @name View#fire
|
||||
* @alias View#trigger
|
||||
* @name View#emit
|
||||
* @function
|
||||
* @param {String('frame', 'resize')} type the event type
|
||||
* @param {Object} event an object literal containing properties describing
|
||||
|
|
Loading…
Reference in a new issue