deck.gl icon indicating copy to clipboard operation
deck.gl copied to clipboard

picking does not support immutable data

Open huaruiw opened this issue 9 years ago • 3 comments

https://github.com/uber/deck.gl/blob/master/src/lib/layer.js#L161 Looks like this needs to be changed to use utils/get.

huaruiw avatar Sep 25 '17 20:09 huaruiw

picking does not support immutable data

We made a big attempt to support immutable data structures in deck.gl but ultimately gave up. Even with our get etc utilities to help manage things, it became too intrusive in the code and there were too many places where things could go wrong, hard to test them all.

That said, if just switching to get in a single place would help your case, you could always open a PR and we'd give it strong consideration.

ibgreen avatar Sep 25 '17 20:09 ibgreen

thanks! did not know support for immutable has been given up. get would work except it also has to check if the object is either an Immutable List or Array before calling get

huaruiw avatar Sep 26 '17 20:09 huaruiw

get would work except it also has to check if the object is either an Immutable List or Array before calling get

FWIW, our implementation of get is actually clever enough to automatically determine whether to call .get() or use square brackets. It looks for the presence of a .get() method on the container's prototype.

ibgreen avatar Sep 26 '17 21:09 ibgreen