Prebuilt module for commit 06d6b5195b

This commit is contained in:
Paper.js Bot 2016-02-12 18:04:32 +00:00
parent 84bf259bca
commit f5689c10d0
5 changed files with 32 additions and 23 deletions

View file

@ -9,7 +9,7 @@
* *
* All rights reserved. * All rights reserved.
* *
* Date: Fri Feb 12 18:54:06 2016 +0100 * Date: Fri Feb 12 19:01:34 2016 +0100
* *
*** ***
* *
@ -11880,6 +11880,7 @@ new function() {
function emitMouseEvent(obj, type, event, point, prevPoint, stopItem) { function emitMouseEvent(obj, type, event, point, prevPoint, stopItem) {
var target = obj, var target = obj,
prevented = false,
mouseEvent; mouseEvent;
function emit(obj, type) { function emit(obj, type) {
@ -11890,6 +11891,8 @@ new function() {
} }
if (obj.emit(type, mouseEvent)) { if (obj.emit(type, mouseEvent)) {
called = true; called = true;
if (mouseEvent.prevented)
prevented = true;
if (mouseEvent.stopped) if (mouseEvent.stopped)
return true; return true;
} }
@ -11902,10 +11905,10 @@ new function() {
while (obj && obj !== stopItem) { while (obj && obj !== stopItem) {
if (emit(obj, type)) if (emit(obj, type))
return true; break;
obj = obj._parent; obj = obj._parent;
} }
return false; return prevented;
} }
function emitMouseEvents(view, item, type, event, point, prevPoint) { function emitMouseEvents(view, item, type, event, point, prevPoint) {
@ -12001,16 +12004,16 @@ new function() {
} }
wasInView = inView; wasInView = inView;
if (mouse.down && inView || mouse.up && downPoint) { if (mouse.down && inView || mouse.up && downPoint) {
var stopped = emitMouseEvents(this, item, type, event, point, var prevented = emitMouseEvents(this, item, type, event, point,
downPoint); downPoint);
if (mouse.down) { if (mouse.down) {
dblClick = item === clickItem dblClick = item === clickItem
&& (Date.now() - clickTime < 300); && (Date.now() - clickTime < 300);
downItem = clickItem = item; downItem = clickItem = item;
dragItem = !stopped && item; dragItem = !prevented && item;
downPoint = lastPoint = point; downPoint = lastPoint = point;
} else if (mouse.up) { } else if (mouse.up) {
if (!stopped && item === downItem) { if (!prevented && item === downItem) {
clickTime = Date.now(); clickTime = Date.now();
emitMouseEvents(this, item, emitMouseEvents(this, item,
dblClick ? 'doubleclick' : 'click', dblClick ? 'doubleclick' : 'click',

15
dist/paper-core.js vendored
View file

@ -9,7 +9,7 @@
* *
* All rights reserved. * All rights reserved.
* *
* Date: Fri Feb 12 18:54:06 2016 +0100 * Date: Fri Feb 12 19:01:34 2016 +0100
* *
*** ***
* *
@ -11880,6 +11880,7 @@ new function() {
function emitMouseEvent(obj, type, event, point, prevPoint, stopItem) { function emitMouseEvent(obj, type, event, point, prevPoint, stopItem) {
var target = obj, var target = obj,
prevented = false,
mouseEvent; mouseEvent;
function emit(obj, type) { function emit(obj, type) {
@ -11890,6 +11891,8 @@ new function() {
} }
if (obj.emit(type, mouseEvent)) { if (obj.emit(type, mouseEvent)) {
called = true; called = true;
if (mouseEvent.prevented)
prevented = true;
if (mouseEvent.stopped) if (mouseEvent.stopped)
return true; return true;
} }
@ -11902,10 +11905,10 @@ new function() {
while (obj && obj !== stopItem) { while (obj && obj !== stopItem) {
if (emit(obj, type)) if (emit(obj, type))
return true; break;
obj = obj._parent; obj = obj._parent;
} }
return false; return prevented;
} }
function emitMouseEvents(view, item, type, event, point, prevPoint) { function emitMouseEvents(view, item, type, event, point, prevPoint) {
@ -12001,16 +12004,16 @@ new function() {
} }
wasInView = inView; wasInView = inView;
if (mouse.down && inView || mouse.up && downPoint) { if (mouse.down && inView || mouse.up && downPoint) {
var stopped = emitMouseEvents(this, item, type, event, point, var prevented = emitMouseEvents(this, item, type, event, point,
downPoint); downPoint);
if (mouse.down) { if (mouse.down) {
dblClick = item === clickItem dblClick = item === clickItem
&& (Date.now() - clickTime < 300); && (Date.now() - clickTime < 300);
downItem = clickItem = item; downItem = clickItem = item;
dragItem = !stopped && item; dragItem = !prevented && item;
downPoint = lastPoint = point; downPoint = lastPoint = point;
} else if (mouse.up) { } else if (mouse.up) {
if (!stopped && item === downItem) { if (!prevented && item === downItem) {
clickTime = Date.now(); clickTime = Date.now();
emitMouseEvents(this, item, emitMouseEvents(this, item,
dblClick ? 'doubleclick' : 'click', dblClick ? 'doubleclick' : 'click',

File diff suppressed because one or more lines are too long

15
dist/paper-full.js vendored
View file

@ -9,7 +9,7 @@
* *
* All rights reserved. * All rights reserved.
* *
* Date: Fri Feb 12 18:54:06 2016 +0100 * Date: Fri Feb 12 19:01:34 2016 +0100
* *
*** ***
* *
@ -11880,6 +11880,7 @@ new function() {
function emitMouseEvent(obj, type, event, point, prevPoint, stopItem) { function emitMouseEvent(obj, type, event, point, prevPoint, stopItem) {
var target = obj, var target = obj,
prevented = false,
mouseEvent; mouseEvent;
function emit(obj, type) { function emit(obj, type) {
@ -11890,6 +11891,8 @@ new function() {
} }
if (obj.emit(type, mouseEvent)) { if (obj.emit(type, mouseEvent)) {
called = true; called = true;
if (mouseEvent.prevented)
prevented = true;
if (mouseEvent.stopped) if (mouseEvent.stopped)
return true; return true;
} }
@ -11902,10 +11905,10 @@ new function() {
while (obj && obj !== stopItem) { while (obj && obj !== stopItem) {
if (emit(obj, type)) if (emit(obj, type))
return true; break;
obj = obj._parent; obj = obj._parent;
} }
return false; return prevented;
} }
function emitMouseEvents(view, item, type, event, point, prevPoint) { function emitMouseEvents(view, item, type, event, point, prevPoint) {
@ -12001,16 +12004,16 @@ new function() {
} }
wasInView = inView; wasInView = inView;
if (mouse.down && inView || mouse.up && downPoint) { if (mouse.down && inView || mouse.up && downPoint) {
var stopped = emitMouseEvents(this, item, type, event, point, var prevented = emitMouseEvents(this, item, type, event, point,
downPoint); downPoint);
if (mouse.down) { if (mouse.down) {
dblClick = item === clickItem dblClick = item === clickItem
&& (Date.now() - clickTime < 300); && (Date.now() - clickTime < 300);
downItem = clickItem = item; downItem = clickItem = item;
dragItem = !stopped && item; dragItem = !prevented && item;
downPoint = lastPoint = point; downPoint = lastPoint = point;
} else if (mouse.up) { } else if (mouse.up) {
if (!stopped && item === downItem) { if (!prevented && item === downItem) {
clickTime = Date.now(); clickTime = Date.now();
emitMouseEvents(this, item, emitMouseEvents(this, item,
dblClick ? 'doubleclick' : 'click', dblClick ? 'doubleclick' : 'click',

File diff suppressed because one or more lines are too long