Prebuilt module for commit f133475405

This commit is contained in:
Paper.js Bot 2016-06-18 21:09:44 +00:00
parent 7a792496dd
commit f6a9529555
6 changed files with 80 additions and 10 deletions

View file

@ -9,7 +9,7 @@
*
* All rights reserved.
*
* Date: Fri Jun 17 00:50:06 2016 +0200
* Date: Sat Jun 18 23:06:17 2016 +0200
*
***
*
@ -643,8 +643,12 @@ var Emitter = {
var handlers = this._callbacks && this._callbacks[type];
if (!handlers)
return false;
var args = [].slice.call(arguments, 1);
var args = [].slice.call(arguments, 1),
setTarget = event && 'target' in event &&
!('currentTarget' in event);
handlers = handlers.slice();
if (setTarget)
event.currentTarget = this;
for (var i = 0, l = handlers.length; i < l; i++) {
if (handlers[i].apply(this, args) === false) {
if (event && event.stop)
@ -652,6 +656,8 @@ var Emitter = {
break;
}
}
if (setTarget)
delete event.currentTarget;
return true;
},

View file

@ -81,6 +81,58 @@
</div>
</div>
</div>
<div id="target" class="member">
<div class="member-link">
<a name="target" href="#target"><tt><b>target</b></tt></a>
</div>
<div class="member-description hidden">
<div class="member-text">
<p>The item that dispatched the event. It is different from <a href="../classes/MouseEvent.html#currenttarget"><tt>currentTarget</tt></a> when the event handler is called during the bubbling phase of the event.</p>
<ul class="member-list">
<h4>Type:</h4>
<li>
<a href="../classes/Item.html"><tt>Item</tt></a>
</li>
</ul>
</div>
</div>
</div>
<div id="currenttarget" class="member">
<div class="member-link">
<a name="currenttarget" href="#currenttarget"><tt><b>currentTarget</b></tt></a>
</div>
<div class="member-description hidden">
<div class="member-text">
<p>The current target for the event, as the event traverses the scene graph. It always refers to the element the event handler has been attached to as opposed to <a href="../classes/MouseEvent.html#target"><tt>target</tt></a> which identifies the element on which the event occurred.</p>
<ul class="member-list">
<h4>Type:</h4>
<li>
<a href="../classes/Item.html"><tt>Item</tt></a>
</li>
</ul>
</div>
</div>

10
dist/paper-core.js vendored
View file

@ -9,7 +9,7 @@
*
* All rights reserved.
*
* Date: Fri Jun 17 00:50:06 2016 +0200
* Date: Sat Jun 18 23:06:17 2016 +0200
*
***
*
@ -643,8 +643,12 @@ var Emitter = {
var handlers = this._callbacks && this._callbacks[type];
if (!handlers)
return false;
var args = [].slice.call(arguments, 1);
var args = [].slice.call(arguments, 1),
setTarget = event && 'target' in event &&
!('currentTarget' in event);
handlers = handlers.slice();
if (setTarget)
event.currentTarget = this;
for (var i = 0, l = handlers.length; i < l; i++) {
if (handlers[i].apply(this, args) === false) {
if (event && event.stop)
@ -652,6 +656,8 @@ var Emitter = {
break;
}
}
if (setTarget)
delete event.currentTarget;
return true;
},

File diff suppressed because one or more lines are too long

10
dist/paper-full.js vendored
View file

@ -9,7 +9,7 @@
*
* All rights reserved.
*
* Date: Fri Jun 17 00:50:06 2016 +0200
* Date: Sat Jun 18 23:06:17 2016 +0200
*
***
*
@ -643,8 +643,12 @@ var Emitter = {
var handlers = this._callbacks && this._callbacks[type];
if (!handlers)
return false;
var args = [].slice.call(arguments, 1);
var args = [].slice.call(arguments, 1),
setTarget = event && 'target' in event &&
!('currentTarget' in event);
handlers = handlers.slice();
if (setTarget)
event.currentTarget = this;
for (var i = 0, l = handlers.length; i < l; i++) {
if (handlers[i].apply(this, args) === false) {
if (event && event.stop)
@ -652,6 +656,8 @@ var Emitter = {
break;
}
}
if (setTarget)
delete event.currentTarget;
return true;
},

File diff suppressed because one or more lines are too long