@@ -5,13 +5,15 @@ Hooks.once("libWrapper.Ready", () => {
5
5
wrapped ( ...args ) ;
6
6
7
7
this . _refreshEditMode ( ) ;
8
- } , " WRAPPER" ) ;
8
+ } , libWrapper . WRAPPER ) ;
9
9
10
10
libWrapper . register ( MODULE_ID , "Drawing.prototype.activateListeners" , function ( wrapped , ...args ) {
11
11
wrapped ( ...args ) ;
12
12
13
- this . frame . handle . off ( "mouseup" ) . on ( "mouseup" , this . _onHandleMouseUp . bind ( this ) ) ;
14
- } , "WRAPPER" ) ;
13
+ const pointerup = isNewerVersion ( game . version , 11 ) ? "pointerup" : "mouseup" ;
14
+
15
+ this . frame . handle . off ( pointerup ) . on ( pointerup , this . _onHandleMouseUp . bind ( this ) ) ;
16
+ } , libWrapper . WRAPPER ) ;
15
17
16
18
libWrapper . register ( MODULE_ID , "Drawing.prototype._onHandleHoverIn" , function ( event ) {
17
19
if ( this . _dragHandle ) {
@@ -26,7 +28,7 @@ Hooks.once("libWrapper.Ready", () => {
26
28
} else if ( handle ) {
27
29
handle . scale . set ( 1.5 , 1.5 ) ;
28
30
}
29
- } , " OVERRIDE" ) ;
31
+ } , libWrapper . OVERRIDE ) ;
30
32
31
33
libWrapper . register ( MODULE_ID , "Drawing.prototype._onHandleHoverOut" , function ( event ) {
32
34
const handle = event . data . handle ;
@@ -37,13 +39,13 @@ Hooks.once("libWrapper.Ready", () => {
37
39
} else if ( handle ) {
38
40
handle . scale . set ( 1.0 , 1.0 ) ;
39
41
}
40
- } , " OVERRIDE" ) ;
42
+ } , libWrapper . OVERRIDE ) ;
41
43
42
44
libWrapper . register ( MODULE_ID , "Drawing.prototype._onHandleMouseDown" , function ( event ) {
43
45
if ( ! this . document . locked ) {
44
46
this . _dragHandle = true ;
45
47
}
46
- } , " OVERRIDE" ) ;
48
+ } , libWrapper . OVERRIDE ) ;
47
49
48
50
libWrapper . register ( MODULE_ID , "Drawing.prototype._onHandleDragStart" , function ( event ) {
49
51
this . _original = this . document . toObject ( ) ;
@@ -71,7 +73,7 @@ Hooks.once("libWrapper.Ready", () => {
71
73
this . document . updateSource ( update ) ;
72
74
this . refresh ( ) ;
73
75
}
74
- } , " OVERRIDE" ) ;
76
+ } , libWrapper . OVERRIDE ) ;
75
77
76
78
libWrapper . register ( MODULE_ID , "Drawing.prototype._onHandleDragMove" , function ( event ) {
77
79
const { handle, destination, origin, originalEvent } = event . data ;
@@ -110,7 +112,7 @@ Hooks.once("libWrapper.Ready", () => {
110
112
this . document . updateSource ( update ) ;
111
113
this . refresh ( ) ;
112
114
} catch ( err ) { }
113
- } , " OVERRIDE" ) ;
115
+ } , libWrapper . OVERRIDE ) ;
114
116
115
117
libWrapper . register ( MODULE_ID , "Drawing.prototype._onHandleDragDrop" , function ( event ) {
116
118
let { handle, destination, origin, originalEvent } = event . data ;
@@ -149,7 +151,7 @@ Hooks.once("libWrapper.Ready", () => {
149
151
}
150
152
151
153
return this . document . update ( update , { diff : false } ) ;
152
- } , " OVERRIDE" ) ;
154
+ } , libWrapper . OVERRIDE ) ;
153
155
154
156
libWrapper . register ( MODULE_ID , "Drawing.prototype._onClickRight" , function ( wrapped , event ) {
155
157
const handle = event . data . handle ;
@@ -179,7 +181,7 @@ Hooks.once("libWrapper.Ready", () => {
179
181
}
180
182
181
183
return wrapped ( event ) ;
182
- } , " MIXED" ) ;
184
+ } , libWrapper . MIXED ) ;
183
185
} ) ;
184
186
185
187
Drawing . prototype . _onHandleMouseUp = function ( event ) {
0 commit comments