-
Notifications
You must be signed in to change notification settings - Fork 61
/
Copy pathevent.js
28 lines (27 loc) · 985 Bytes
/
event.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
export default function DragEvent(type, {
sourceEvent,
subject,
target,
identifier,
active,
x, y, dx, dy,
dispatch
}) {
Object.defineProperties(this, {
type: {value: type, enumerable: true, configurable: true},
sourceEvent: {value: sourceEvent, enumerable: true, configurable: true},
subject: {value: subject, enumerable: true, configurable: true},
target: {value: target, enumerable: true, configurable: true},
identifier: {value: identifier, enumerable: true, configurable: true},
active: {value: active, enumerable: true, configurable: true},
x: {value: x, enumerable: true, configurable: true},
y: {value: y, enumerable: true, configurable: true},
dx: {value: dx, enumerable: true, configurable: true},
dy: {value: dy, enumerable: true, configurable: true},
_: {value: dispatch}
});
}
DragEvent.prototype.on = function() {
var value = this._.on.apply(this._, arguments);
return value === this._ ? this : value;
};