mapbox / mapbox/mapbox-gl-draw

Features flicker on selection change

Open
#871 8 comments 19 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

performance rendering
Dominant language
JavaScript
Stars
1.1k
Forks
612
Avg merge
8d 9h
Merged PRs (30d)
5

Description

Hello,

When mapbox-gl-draw source is getting big, user can observe flickering of drawn features on selection change:

![feb-22-2019 12-00-28](https://user-images.githubusercontent.com/2737364/53238597-ed430780-3699-11e9-98af-e17781b7a9fb.gif)

It seems like plugin moves features from one source to another and when there's many features on the map this operation takes time. Maybe for a moment features affected by selection change are not part of any source.

Do you think it is possible to somehow fix this?

**Demo:** https://jsfiddle.net/tpe907dc/

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked JSFiddle demo and reproduce selection changes with a large mapbox-gl-draw source. Trace how selection changes move features between sources; done means the visible features no longer flicker during selection changes, including with many drawn features.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.