-
Notifications
You must be signed in to change notification settings - Fork 0
/
GestureEvent.cljs
54 lines (43 loc) · 1.61 KB
/
GestureEvent.cljs
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
(ns web.GestureEvent
"The GestureEvent is a proprietary interface specific to WebKit
gives information regarding multi-touch gestures. Events using
interface include gesturestart, gesturechange, and gestureend."
(:refer-clojure :exclude []))
(defn init-gesture-event
"Method.
Initializes the value of an GestureEvent. If the event has already
dispatched, this method does nothing."
[this & args]
(-> this .-initGestureEvent (.apply this (clj->js args))))
(defn rotation
"Property.
Change in rotation (in degrees) since the event's beginning.
values indicate clockwise rotation; negative values indicate
rotation. Initial value: 0.0"
[this]
(-> this (.-rotation)))
(defn set-rotation!
"Property.
Change in rotation (in degrees) since the event's beginning.
values indicate clockwise rotation; negative values indicate
rotation. Initial value: 0.0"
[this val]
(aset this "rotation" val))
(defn scale
"Property.
Distance between two digits since the event's beginning. Expressed
a floating-point multiple of the initial distance between the
at the beginning of the gesture. Values below 1.0 indicate an
pinch (zoom out). Values above 1.0 indicate an outward unpinch
in). Initial value: 1.0"
[this]
(-> this (.-scale)))
(defn set-scale!
"Property.
Distance between two digits since the event's beginning. Expressed
a floating-point multiple of the initial distance between the
at the beginning of the gesture. Values below 1.0 indicate an
pinch (zoom out). Values above 1.0 indicate an outward unpinch
in). Initial value: 1.0"
[this val]
(aset this "scale" val))