Mapbox-gl-js: Refactor to clearly differentiate between "interaction handler" events and "camera mutation" events

Created on 12 Oct 2016  ·  5Comments  ·  Source: mapbox/mapbox-gl-js

Some interaction handlers fire events that are named as if they originate the Camera rather than the interaction handler. The separation between these two types of events should be explicit.

  • [ ] make DragPanInteraction fire dragpanstart and dragpanend instead of movestart and moveend
  • [ ] make DragRotateInteraction fire dragrotatestart and dragrotateend instead of rotate, move, rotatestart, movestart, rotateend, moveend
  • [ ] ensure camera fires {pitch, rotate, move} x {*, *start, *end} events itself whenever appropriate
  • [ ] prevent interaction handlers with inertia from firing multiple moveend events within an individual interaction

Related to #3068 #2792

api

Most helpful comment

Is this being worked on? Having a list update while pinch zooming is in progress is really slow, despite using the moveend event.

All 5 comments

Can you clarify a bit? The two items above seem unrelated to the issue title — which events would you consider "interaction handler" and which "camera mutation"?

I would consider all the above events to represent "camera mutations" not "interaction handler" events. Those events should be fired by Camera exclusively.

  • BoxZoomInteraction fires boxzoomstart and boxzoomend events. :+1:
  • Camera fires movestart and moveend 👍
  • DragPanInteraction also fires movestart and moveend :no_good_man: It should fire events called dragpanstart and dragpanend

I updated the original ticket to be more explicit about next actions.

Agreed, thanks for clearing this up.

Is this being worked on? Having a list update while pinch zooming is in progress is really slow, despite using the moveend event.

@pke adding this to my list of eventing chores here #4253 😅

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stevage picture stevage  ·  3Comments

BernhardRode picture BernhardRode  ·  3Comments

aaronlidman picture aaronlidman  ·  3Comments

foundryspatial-duncan picture foundryspatial-duncan  ·  3Comments

yoursweater picture yoursweater  ·  3Comments