svgdotjs / svg.js

The lightweight library for manipulating and animating SVG
https://svgjs.dev
Other
10.95k stars 1.07k forks source link

Can't set 'pointer-events' #1292

Closed byrakham closed 10 months ago

byrakham commented 1 year ago

When I use 'pointerEvents' as CSSStyleDeclaration in the Dom.css(style: T) method, it translates it to 'pointerevents ' instead of 'pointer-events' value. Could you please check the camelCase() method in the css.js file?

Fuzzyma commented 1 year ago

Seems like the camelCase function makes everything lowercase before it transforms kebap-case to camelCase. In this situation that seems to be undesired behavior.

If the tests don't start failing after removing the lowercase call it should be fine 🤔

byrakham commented 1 year ago

The temporary solution is:
const style = { "pointer-events": 'none' }; someElement.css(style);

Fuzzyma commented 10 months ago

fixed in master