You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
633 B
18 lines
633 B
import { __assign } from "tslib";
|
|
import { isNumber, isString } from '@antv/util';
|
|
import { Text, HTML } from '../shapes';
|
|
export function renderExtDo(el) {
|
|
if (typeof el === 'function')
|
|
return el();
|
|
return isString(el) || isNumber(el) ? new Text({ style: { text: String(el) } }) : el;
|
|
}
|
|
export function renderHtmlExtDo(el, style) {
|
|
if (typeof el === 'function')
|
|
return el();
|
|
return isString(el) || isNumber(el)
|
|
? new HTML({
|
|
style: __assign(__assign({ pointerEvents: 'auto' }, style), { innerHTML: el }),
|
|
})
|
|
: el;
|
|
}
|
|
//# sourceMappingURL=extend-display-object.js.map
|