teralytics / flowmap.gl

Flow map drawing layer for deck.gl
https://teralytics.github.io/flowmap.gl/
Apache License 2.0
173 stars 20 forks source link

LocationArea Opacity #114

Closed wonjiky closed 3 years ago

wonjiky commented 3 years ago

Hello,

Is it possible to change the locationArea fill color when they are at normal state without the warning printing? I am trying to match the locationArea color to match the default mapbox shape tile color and change the opacity when a locationArea is hovered.

For example, I have : locationAreas: { normal: "rgba(0,0,0,0)" }

And it keeps on giving me this warning, colors.js?4931:96 Invalid color: rgba(NaN, NaN, NaN, 0.5) I have tried adding the color in as hex #fff0 but no luck..

Thank you in advance!

ilyabo commented 3 years ago

Ah, I know what's the issue:

As a workaround, just use rgba(255,255,255,0), since you set opacity to 0 anyways. Or specify all colors for locationAreas: connected, highlighted, selected and outline.

wonjiky commented 3 years ago

Thank you so much for the quick response @ilyabo !