UNPKG

@antv/s2

Version:

effective spreadsheet render core lib

17 lines 499 B
import { Rect, } from '@antv/g'; import { get, set } from 'lodash'; export function batchSetStyle(obj, style) { obj.setAttributes(style, { skipDispatchAttrModifiedEvent: true }); } export function createOrUpdateRect(propertyPath, style) { // @ts-ignore const context = this; const obj = get(context, propertyPath); if (!obj) { set(context, propertyPath, new Rect({ style })); } else { batchSetStyle(obj, style); } } //# sourceMappingURL=g-utils.js.map