Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drag event types support added #987

Merged
merged 7 commits into from Apr 26, 2022

Conversation

GULERTOLGA
Copy link
Contributor

onFeatureDrag was fired only when dragging the feature. Along with this PR, onFeatureDrag is also fired at the start and end of the drag. The event type is added to the payload with an enumeration.


  void _onMapCreated(MapboxMapController controller) {
    this.controller = controller;
    controller.onFillTapped.add(_onFillTapped);
    this.controller!.onFeatureDrag.add(_onFeatureDrag);
  }

  void _onFeatureDrag(id,
      {required current, required delta, required origin, required point, required eventType}) {
    DragEventType type = eventType;
    switch (type) {
      case DragEventType.start:
        // TODO: Handle this case.
        break;
      case DragEventType.drag:
        // TODO: Handle this case.
        break;
      case DragEventType.end:
        // TODO: Handle this case.
        break;
    }
  }

@felix-ht
Copy link
Collaborator

felix-ht commented Apr 4, 2022

please also run dart format

@GULERTOLGA GULERTOLGA requested a review from felix-ht April 5, 2022 11:14
ios/Classes/MapboxMapController.swift Outdated Show resolved Hide resolved
ios/Classes/MapboxMapController.swift Outdated Show resolved Hide resolved
@felix-ht felix-ht temporarily deployed to ANDROID_CI_DOWNLOADS_TOKEN April 25, 2022 13:39 Inactive
@felix-ht felix-ht temporarily deployed to ANDROID_CI_DOWNLOADS_TOKEN April 25, 2022 13:39 Inactive
ios/Classes/MapboxMapController.swift Outdated Show resolved Hide resolved
@felix-ht felix-ht temporarily deployed to ANDROID_CI_DOWNLOADS_TOKEN April 26, 2022 09:28 Inactive
@felix-ht felix-ht temporarily deployed to ANDROID_CI_DOWNLOADS_TOKEN April 26, 2022 09:28 Inactive
Copy link
Collaborator

@felix-ht felix-ht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@felix-ht felix-ht merged commit 62650dd into flutter-mapbox-gl:master Apr 26, 2022
FreeGrow added a commit to FreeGrow/maps that referenced this pull request Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants