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.
 
 
 
 

88 lines
1.6 KiB

export var PRIMILTIVE_ATTRIBUTES = [
'$el',
'cx',
'cy',
'd',
'dx',
'dy',
'fill',
'fillOpacity',
'filter',
'fontFamily',
'fontSize',
'fontStyle',
'fontVariant',
'fontWeight',
'height',
'img',
'increasedLineWidthForHitTesting',
'innerHTML',
'isBillboard',
'billboardRotation',
'isSizeAttenuation',
'isClosed',
'isOverflowing',
'leading',
'letterSpacing',
'lineDash',
'lineHeight',
'lineWidth',
'markerEnd',
'markerEndOffset',
'markerMid',
'markerStart',
'markerStartOffset',
'maxLines',
'metrics',
'miterLimit',
'offsetX',
'offsetY',
'opacity',
'path',
'points',
'r',
'radius',
'rx',
'ry',
'shadowColor',
'src',
'stroke',
'strokeOpacity',
'text',
'textAlign',
'textBaseline',
'textDecorationColor',
'textDecorationLine',
'textDecorationStyle',
'textOverflow',
'textPath',
'textPathSide',
'textPathStartOffset',
'transform',
'transformOrigin',
'visibility',
'width',
'wordWrap',
'wordWrapWidth',
'x',
'x1',
'x2',
'y',
'y1',
'y2',
'z1',
'z2',
'zIndex',
];
export function isPrimitiveAttribute(key) {
return PRIMILTIVE_ATTRIBUTES.includes(key);
}
export function getPrimitiveAttributes(attributes) {
var object = {};
for (var key in attributes) {
if (isPrimitiveAttribute(key))
object[key] = attributes[key];
}
return object;
}
//# sourceMappingURL=primitive.js.map