plotboilerplate
Version:
A simple javascript plotting boilerplate for 2d stuff.
7 lines • 341 B
text/typescript
/**
* Internal helper function used to get 'float' properties from elements.
* Used to determine border withs and paddings that were defined using CSS.
*/
export const getFProp = (elem: HTMLElement | SVGElement, propName: string): number => {
return parseFloat(globalThis.getComputedStyle(elem, null).getPropertyValue(propName));
}