Skip to content

parseUnit

parseUnit(value, fontSize): number

Defined in: src/util/misc/svgParsing.ts:53

Converts from attribute value to pixel value if applicable. Returns converted pixels or original value not converted.

Parameters

value

string

number to operate on

fontSize

number = DEFAULT_SVG_FONT_SIZE

Returns

number