Replies: 2 comments
-
Is there also a way to specify a custom |
Beta Was this translation helpful? Give feedback.
0 replies
-
Most of the handler logic is internal, and too complicated if you ask me. Have you tried css' animation-delay? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Recently I wanted to add a delay before displaying the text of CooperativeGesturesHandler on smartphones, so I decided to create my own Handler that extends of CooperativeGesturesHandler :
But here comes the problem : when adding a new Handler this way :
I can't find a way to specify the order inside the HandlerManager._handlers array, I need to specify an order because handlers "touchPan", and "touchZoom" are blocking the "touchMove" event. I can add an allowed list to the "_add" method this way :
map.handlers._add("cooperativeGestures", cooperativeGestures , ["touchPan", "touchZoom"]);
but now because my custom handler is added at the end of HandlerManager._handlers "touchZoom" and "touchPan" are not blocked by my custom handler.Well it works, but when it comes to edit other handlers it becomes harder, that's why I would love to have some advices, or the best practices to create my custom handlers.
By the way I would avoid to use HandlerManager._handlers or HandlerManager._handlersById, because in my mind prefixed by _ variables can be changed in new realeases, and I even don't know if it's a great idea to use map.handlers._add too.
Any advices would be appreciate :)
Beta Was this translation helpful? Give feedback.
All reactions