@@ -90,12 +90,10 @@ class ActionHandler extends HTMLElement implements ActionHandler {
9090 y = ( ev as MouseEvent ) . pageY ;
9191 }
9292
93- if ( options . hasHold ) {
94- this . timer = window . setTimeout ( ( ) => {
95- this . startAnimation ( x , y ) ;
96- this . held = true ;
97- } , this . holdTime ) ;
98- }
93+ this . timer = window . setTimeout ( ( ) => {
94+ this . startAnimation ( x , y ) ;
95+ this . held = true ;
96+ } , this . holdTime ) ;
9997
10098 this . cooldownStart = true ;
10199 window . setTimeout ( ( ) => ( this . cooldownStart = false ) , 100 ) ;
@@ -141,7 +139,7 @@ class ActionHandler extends HTMLElement implements ActionHandler {
141139 // That might be a bug, but until it's fixed, this should make action-handler work.
142140 // If it's not a bug that is fixed, this might need updating with the next iOS version.
143141 // Note that all events (both touch and mouse) must be listened for in order to work on computers with both mouse and touchscreen.
144- const isIOS13 = window . navigator . userAgent . match ( / i P h o n e O S 1 3 _ / ) ;
142+ const isIOS13 = / i P h o n e O S 1 3 _ / . test ( window . navigator . userAgent ) ;
145143 if ( ! isIOS13 ) {
146144 element . addEventListener ( 'mousedown' , clickStart , { passive : true } ) ;
147145 element . addEventListener ( 'click' , clickEnd ) ;
@@ -168,7 +166,7 @@ class ActionHandler extends HTMLElement implements ActionHandler {
168166
169167customElements . define ( 'action-handler-radial' , ActionHandler ) ;
170168
171- const geActionHandler = ( ) : ActionHandler => {
169+ const getActionHandler = ( ) : ActionHandler => {
172170 const body = document . body ;
173171 if ( body . querySelector ( 'action-handler-radial' ) ) {
174172 return body . querySelector ( 'action-handler-radial' ) as ActionHandler ;
@@ -181,7 +179,7 @@ const geActionHandler = (): ActionHandler => {
181179} ;
182180
183181export const actionHandlerBind = ( element : ActionHandlerElement , options : ActionHandlerOptions ) : void => {
184- const actionhandler : ActionHandler = geActionHandler ( ) ;
182+ const actionhandler : ActionHandler = getActionHandler ( ) ;
185183 if ( ! actionhandler ) {
186184 return ;
187185 }
0 commit comments