|
|
|
@ -192,5 +192,5 @@ export function action_destroyer(action_result) {
|
|
|
|
|
|
|
|
|
|
|
|
export function split_css_unit(value: number | string): [number, string] {
|
|
|
|
export function split_css_unit(value: number | string): [number, string] {
|
|
|
|
const split = typeof value === 'string' && value.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);
|
|
|
|
const split = typeof value === 'string' && value.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);
|
|
|
|
return split ? [parseFloat(split[1]), split[2] || 'px'] : [value, 'px'];
|
|
|
|
return split ? [parseFloat(split[1]), split[2] || 'px'] : [value as number, 'px'];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|