CartoDB / toolkit

JS library to interact with CARTO APIs in a simple way
https://toolkit-wheat.now.sh
BSD 3-Clause "New" or "Revised" License
9 stars 3 forks source link

Keep layer ordering #126

Closed VictorVelarde closed 4 years ago

VictorVelarde commented 4 years ago

We're always pushing the layer to the last position, every time we update it. By default, we should keep its current position.

This PR just ensures that.

~I have added also a small refactor, affecting quite a lot of files in 1 commit: rename getLayerProps to getProps in Style class, which I think it's nicer.~ (reverted)

Note: I have made 'replaceDeckGLLayer' method public for the Layer. I think it makes sense to have it, but I'm open to suggestions.

@manmorjim I'm not sure how if we need to add any other change, in the context of popups management.

vercel[bot] commented 4 years ago

This pull request is being automatically deployed with Vercel (learn more). To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/carto-frontend/toolkit/qn1021o6k ✅ Preview: https://toolkit-git-victor-keep-layer-order.carto-frontend.now.sh

VictorVelarde commented 4 years ago

We can wait for #123 and #118 to be merged, in order to ease merging.

VictorVelarde commented 4 years ago

I'm gonna revert the refactor, so this is really small and we can merge it without colliding with any other PR WIP. Would you please @oleurud ?