-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.coffee
34 lines (28 loc) · 943 Bytes
/
index.coffee
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
29
30
31
32
33
34
# This touches the window object, breaking module encapsulation.
# Just make sure it's only require'd once.
require("./pepjs")
PepEvents = {
PointerMove: "pointermove",
PointerDown: "pointerdown",
PointerUp: "pointerup",
PointerOver: "pointerover",
PointerOut: "pointerout",
PointerEnter: "pointerenter",
PointerLeave: "pointerleave",
PointerCancel: "pointercancel"
}
exports.PointerEvents = PepEvents
class PepLayer extends Framer.Layer
constructor: (options = {}) ->
super(options)
this._element.setAttribute("touch-action", "none")
# needed to pass Framer's Utils.domValidEvent check
this._element.onpointermove = null
this._element.onpointerdown = null
this._element.onpointerup = null
this._element.onpointerover = null
this._element.onpointerout = null
this._element.onpointerenter = null
this._element.onpointerleave = null
this._element.onpointercancel = null
exports.PointerEventLayer = PepLayer