flekschas/piling.js

Black doesn't result in an overwrite of pileBackgroundColor

Closed this issue · 0 comments

Black as a color for pileBackgroundColor* (e.g., pileBackgroundColorHover) doesn't overwrite pileBackgroundColor. Presumably because we 0x000000 === 0 and 0 is falsy.

E.g.,

pileBackgroundColor: 'rgba(255, 0, 0, 0)',
pileBackgroundColorHover: 'rgba(0, 0, 0, 1)',

Will not lead to a black background on hover but a red background.

pileBackgroundColor: 'rgba(255, 0, 0, 0)',
pileBackgroundColorHover: 'rgba(0, 0, 255, 1)',

Will work as expected though