@antv/g 5.16.13 → 5.16.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.umd.js +6 -11
- package/dist/index.umd.min.js +1 -1
- package/package.json +3 -3
package/dist/index.umd.js
CHANGED
|
@@ -8633,7 +8633,7 @@
|
|
|
8633
8633
|
// : INHERITABLE_BASE_STYLE_PROPS,
|
|
8634
8634
|
};if(runtime.enableCSSParsing){// @ts-ignore
|
|
8635
8635
|
options.usedAttributes=INHERITABLE_STYLE_PROPS;}// account for FCP, process properties as less as possible
|
|
8636
|
-
runtime.styleValueRegistry.processProperties(this,
|
|
8636
|
+
var formattedAttributes={};for(var name in attributes){var attributeName=formatAttributeName(name);formattedAttributes[attributeName]=attributes[name];}runtime.styleValueRegistry.processProperties(this,formattedAttributes,options);// redraw at next frame
|
|
8637
8637
|
renderable.dirty=true;};_proto.setAttribute=function setAttribute(name,value,force){if(force===void 0){force=false;}var attributeName=formatAttributeName(name);// ignore undefined value
|
|
8638
8638
|
if(isUndefined(value)){return;}if(force||value!==this.attributes[attributeName]){this.internalSetAttribute(attributeName,value);_Element.prototype.setAttribute.call(this,attributeName,value);}}/**
|
|
8639
8639
|
* called when attributes get changed or initialized
|
|
@@ -8883,7 +8883,9 @@
|
|
|
8883
8883
|
*/n:'fill',int:true,k:['none'],d:'none',syntax:exports.PropertySyntax.PAINT},{n:'fillRule',k:['nonzero','evenodd'],d:'nonzero'},/**
|
|
8884
8884
|
* default to none
|
|
8885
8885
|
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke#usage_notes
|
|
8886
|
-
*/{n:'stroke',int:true,k:['none'],d:'none',syntax:exports.PropertySyntax.PAINT
|
|
8886
|
+
*/{n:'stroke',int:true,k:['none'],d:'none',syntax:exports.PropertySyntax.PAINT,/**
|
|
8887
|
+
* Stroke 'none' won't affect geometry but others will.
|
|
8888
|
+
*/l:true},{n:'shadowType',k:['inner','outer','both'],d:'outer',l:true},{n:'shadowColor',int:true,syntax:exports.PropertySyntax.COLOR},{n:'shadowOffsetX',int:true,l:true,d:'0',syntax:exports.PropertySyntax.LENGTH_PERCENTAGE},{n:'shadowOffsetY',int:true,l:true,d:'0',syntax:exports.PropertySyntax.LENGTH_PERCENTAGE},{n:'shadowBlur',int:true,l:true,d:'0',syntax:exports.PropertySyntax.SHADOW_BLUR},{/**
|
|
8887
8889
|
* @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-width
|
|
8888
8890
|
*/n:'lineWidth',int:true,inh:true,d:'1',l:true,a:['strokeWidth'],syntax:exports.PropertySyntax.LENGTH_PERCENTAGE},{n:'increasedLineWidthForHitTesting',inh:true,d:'0',l:true,syntax:exports.PropertySyntax.LENGTH_PERCENTAGE},{n:'lineJoin',inh:true,l:true,a:['strokeLinejoin'],k:['miter','bevel','round'],d:'miter'},{n:'lineCap',inh:true,l:true,a:['strokeLinecap'],k:['butt','round','square'],d:'butt'},{n:'lineDash',int:true,inh:true,k:['none'],a:['strokeDasharray'],syntax:exports.PropertySyntax.LENGTH_PERCENTAGE_12},{n:'lineDashOffset',int:true,inh:true,d:'0',a:['strokeDashoffset'],syntax:exports.PropertySyntax.LENGTH_PERCENTAGE},{n:'offsetPath',syntax:exports.PropertySyntax.DEFINED_PATH},{n:'offsetDistance',int:true,syntax:exports.PropertySyntax.OFFSET_DISTANCE},{n:'dx',int:true,l:true,d:'0',syntax:exports.PropertySyntax.LENGTH_PERCENTAGE},{n:'dy',int:true,l:true,d:'0',syntax:exports.PropertySyntax.LENGTH_PERCENTAGE},{n:'zIndex',ind:true,int:true,d:'0',k:['auto'],syntax:exports.PropertySyntax.Z_INDEX},{n:'visibility',k:['visible','hidden'],ind:true,inh:true,/**
|
|
8889
8891
|
* support interpolation
|
|
@@ -8927,14 +8929,7 @@
|
|
|
8927
8929
|
*
|
|
8928
8930
|
* * calculate used value
|
|
8929
8931
|
* * post process
|
|
8930
|
-
*/;_proto.processProperties=function processProperties(object,attributes,options){var _this2=this;if(options===void 0){options={skipUpdateAttribute:false,skipParse:false,forceUpdateGeometry:false,usedAttributes:[]};}if(!runtime.enableCSSParsing){
|
|
8931
|
-
// @ts-ignore
|
|
8932
|
-
if(attributes.src){// @ts-ignore
|
|
8933
|
-
attributes.img=attributes.src;}// @ts-ignore
|
|
8934
|
-
if(attributes.d){// @ts-ignore
|
|
8935
|
-
attributes.path=attributes.d;}if(attributes.strokeDasharray){attributes.lineDash=attributes.strokeDasharray;}if(attributes.strokeWidth){attributes.lineWidth=attributes.strokeWidth;}// @ts-ignore
|
|
8936
|
-
if(attributes.textAnchor){// @ts-ignore
|
|
8937
|
-
attributes.textAlign=attributes.textAnchor;}Object.assign(object.attributes,attributes);var _attributeNames=Object.keys(attributes);// clipPath
|
|
8932
|
+
*/;_proto.processProperties=function processProperties(object,attributes,options){var _this2=this;if(options===void 0){options={skipUpdateAttribute:false,skipParse:false,forceUpdateGeometry:false,usedAttributes:[]};}if(!runtime.enableCSSParsing){Object.assign(object.attributes,attributes);var _attributeNames=Object.keys(attributes);// clipPath
|
|
8938
8933
|
var oldClipPath=object.parsedStyle.clipPath;var oldOffsetPath=object.parsedStyle.offsetPath;object.parsedStyle=Object.assign(object.parsedStyle,attributes);var _needUpdateGeometry=!!options.forceUpdateGeometry;if(!_needUpdateGeometry){for(var i=0;i<GEOMETRY_ATTRIBUTE_NAMES.length;i++){if(GEOMETRY_ATTRIBUTE_NAMES[i]in attributes){_needUpdateGeometry=true;break;}}}if(attributes.fill){object.parsedStyle.fill=parseColor(attributes.fill);}if(attributes.stroke){object.parsedStyle.stroke=parseColor(attributes.stroke);}if(attributes.shadowColor){object.parsedStyle.shadowColor=parseColor(attributes.shadowColor);}if(attributes.filter){object.parsedStyle.filter=parseFilter(attributes.filter);}// Rect
|
|
8939
8934
|
// @ts-ignore
|
|
8940
8935
|
if(!isNil(attributes.radius)){// @ts-ignore
|
|
@@ -8976,7 +8971,7 @@
|
|
|
8976
8971
|
!isNil(attributes.y2)||// @ts-ignore
|
|
8977
8972
|
!isNil(attributes.z2))){runtime.CSSPropertySyntaxFactory['<coordinate>'].postProcessor(object,_attributeNames);}if(!isNil(attributes.zIndex)){runtime.CSSPropertySyntaxFactory['<z-index>'].postProcessor(object,_attributeNames);}// @ts-ignore
|
|
8978
8973
|
if(attributes.path){runtime.CSSPropertySyntaxFactory['<path>'].postProcessor(object,_attributeNames);}// @ts-ignore
|
|
8979
|
-
if(attributes.points){runtime.CSSPropertySyntaxFactory['<list-of-points>'].postProcessor(object,_attributeNames);}if(!isNil(attributes.offsetDistance)){runtime.CSSPropertySyntaxFactory['<offset-distance>'].postProcessor(object,_attributeNames);}if(attributes.transform){runtime.CSSPropertySyntaxFactory['<transform>'].postProcessor(object,_attributeNames);}if(_needUpdateGeometry){this.updateGeometry(object);}return;}var _options=options,skipUpdateAttribute=_options.skipUpdateAttribute,skipParse=_options.skipParse,forceUpdateGeometry=_options.forceUpdateGeometry,usedAttributes=_options.usedAttributes;var needUpdateGeometry=forceUpdateGeometry;var attributeNames=Object.keys(attributes);attributeNames.forEach(function(attributeName){var _propertyMetadataCach;
|
|
8974
|
+
if(attributes.points){runtime.CSSPropertySyntaxFactory['<list-of-points>'].postProcessor(object,_attributeNames);}if(!isNil(attributes.offsetDistance)){runtime.CSSPropertySyntaxFactory['<offset-distance>'].postProcessor(object,_attributeNames);}if(attributes.transform){runtime.CSSPropertySyntaxFactory['<transform>'].postProcessor(object,_attributeNames);}if(_needUpdateGeometry){this.updateGeometry(object);}return;}var _options=options,skipUpdateAttribute=_options.skipUpdateAttribute,skipParse=_options.skipParse,forceUpdateGeometry=_options.forceUpdateGeometry,usedAttributes=_options.usedAttributes;var needUpdateGeometry=forceUpdateGeometry;var attributeNames=Object.keys(attributes);attributeNames.forEach(function(attributeName){var _propertyMetadataCach;if(!skipUpdateAttribute){object.attributes[attributeName]=attributes[attributeName];}if(!needUpdateGeometry&&((_propertyMetadataCach=propertyMetadataCache[attributeName])===null||_propertyMetadataCach===void 0?void 0:_propertyMetadataCach.l)){needUpdateGeometry=true;}});if(!skipParse){attributeNames.forEach(function(name){object.computedStyle[name]=_this2.parseProperty(name,object.attributes[name],object);});}// let hasUnresolvedProperties = false;
|
|
8980
8975
|
// parse according to priority
|
|
8981
8976
|
// path 50
|
|
8982
8977
|
// points 50
|