Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const getLineAttrs = (cfg) => {
const defaultAttrs = Global.theme.shape.hollowInterval;
const attrs = _.mix({}, defaultAttrs, cfg.style);
ShapeUtil.addStrokeAttrs(attrs, cfg);
return attrs;
};
const getFillAttrs = (cfg) => {
const defaultAttrs = Global.theme.shape.interval;
const attrs = _.mix({}, defaultAttrs, cfg.style);
ShapeUtil.addFillAttrs(attrs, cfg);
if (cfg.color) {
attrs.stroke = attrs.stroke || cfg.color;
}
return attrs;
};