@antv/g 5.16.24 → 5.16.26

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 CHANGED
@@ -7903,7 +7903,7 @@
7903
7903
  * local position
7904
7904
  */var CSSPropertyLocalPosition=/*#__PURE__*/function(_CSSPropertyLengthOrP){_inheritsLoose(CSSPropertyLocalPosition,_CSSPropertyLengthOrP);function CSSPropertyLocalPosition(){return _CSSPropertyLengthOrP.apply(this,arguments)||this;}var _proto=CSSPropertyLocalPosition.prototype;/**
7905
7905
  * update local position
7906
- */_proto.postProcessor=function postProcessor(object,attributes){var x;var y;var z;switch(object.nodeName){case exports.Shape.CIRCLE:case exports.Shape.ELLIPSE:var _object$parsedStyle=object.parsedStyle,cx=_object$parsedStyle.cx,cy=_object$parsedStyle.cy;if(!isNil(cx)){x=cx;}if(!isNil(cy)){y=cy;}break;case exports.Shape.LINE:var _object$parsedStyle2=object.parsedStyle,x1=_object$parsedStyle2.x1,x2=_object$parsedStyle2.x2,y1=_object$parsedStyle2.y1,y2=_object$parsedStyle2.y2;var minX=Math.min(x1,x2);var minY=Math.min(y1,y2);x=minX;y=minY;z=0;break;case exports.Shape.RECT:case exports.Shape.IMAGE:case exports.Shape.GROUP:case exports.Shape.HTML:case exports.Shape.TEXT:case exports.Shape.MESH:if(!isNil(object.parsedStyle.x)){x=object.parsedStyle.x;}if(!isNil(object.parsedStyle.y)){y=object.parsedStyle.y;}if(!isNil(object.parsedStyle.z)){z=object.parsedStyle.z;}break;}if(object.nodeName!==exports.Shape.PATH&&object.nodeName!==exports.Shape.POLYLINE&&object.nodeName!==exports.Shape.POLYGON){object.parsedStyle.defX=x||0;object.parsedStyle.defY=y||0;}var needResetLocalPosition=!isNil(x)||!isNil(y)||!isNil(z);// only if `transform` won't be processed later
7906
+ */_proto.postProcessor=function postProcessor(object,attributes){var x;var y;var z;switch(object.nodeName){case exports.Shape.CIRCLE:case exports.Shape.ELLIPSE:var _object$parsedStyle=object.parsedStyle,cx=_object$parsedStyle.cx,cy=_object$parsedStyle.cy,cz=_object$parsedStyle.cz;if(!isNil(cx)){x=cx;}if(!isNil(cy)){y=cy;}if(!isNil(cz)){z=cz;}break;case exports.Shape.LINE:var _object$parsedStyle2=object.parsedStyle,x1=_object$parsedStyle2.x1,x2=_object$parsedStyle2.x2,y1=_object$parsedStyle2.y1,y2=_object$parsedStyle2.y2;var minX=Math.min(x1,x2);var minY=Math.min(y1,y2);x=minX;y=minY;z=0;break;case exports.Shape.RECT:case exports.Shape.IMAGE:case exports.Shape.GROUP:case exports.Shape.HTML:case exports.Shape.TEXT:case exports.Shape.MESH:if(!isNil(object.parsedStyle.x)){x=object.parsedStyle.x;}if(!isNil(object.parsedStyle.y)){y=object.parsedStyle.y;}if(!isNil(object.parsedStyle.z)){z=object.parsedStyle.z;}break;}if(object.nodeName!==exports.Shape.PATH&&object.nodeName!==exports.Shape.POLYLINE&&object.nodeName!==exports.Shape.POLYGON){object.parsedStyle.defX=x||0;object.parsedStyle.defY=y||0;}var needResetLocalPosition=!isNil(x)||!isNil(y)||!isNil(z);// only if `transform` won't be processed later
7907
7907
  if(needResetLocalPosition&&attributes.indexOf('transform')===-1){// account for current transform if needed
7908
7908
  var transform=object.parsedStyle.transform;if(transform&&transform.length){parsedTransformToMat4(transform,object);}else {var _object$getLocalPosit=object.getLocalPosition(),ox=_object$getLocalPosit[0],oy=_object$getLocalPosit[1],oz=_object$getLocalPosit[2];object.setLocalPosition(isNil(x)?ox:x,isNil(y)?oy:y,isNil(z)?oz:z);}}};return CSSPropertyLocalPosition;}(CSSPropertyLengthOrPercentage);var CSSPropertyMarker=/*#__PURE__*/function(){function CSSPropertyMarker(){}var _proto=CSSPropertyMarker.prototype;_proto.calculator=function calculator(name,oldMarker,newMarker,object){var _newMarker;// unset
7909
7909
  if(newMarker instanceof CSSKeywordValue){newMarker=null;}var cloned=(_newMarker=newMarker)===null||_newMarker===void 0?void 0:_newMarker.cloneNode(true);if(cloned){// FIXME: SVG should not inherit parent's style, add a flag here
@@ -8815,7 +8815,7 @@
8815
8815
  */int:true,d:'visible'},{n:'pointerEvents',inh:true,k:['none','auto','stroke','fill','painted','visible','visiblestroke','visiblefill','visiblepainted',// 'bounding-box',
8816
8816
  'all'],d:'auto'},{n:'filter',ind:true,l:true,k:['none'],d:'none',syntax:exports.PropertySyntax.FILTER},{n:'clipPath',syntax:exports.PropertySyntax.DEFINED_PATH},{n:'textPath',syntax:exports.PropertySyntax.DEFINED_PATH},{n:'textPathSide',k:['left','right'],d:'left'},{n:'textPathStartOffset',l:true,d:'0',syntax:exports.PropertySyntax.LENGTH_PERCENTAGE},{n:'transform',p:100,int:true,k:['none'],d:'none',syntax:exports.PropertySyntax.TRANSFORM},{n:'transformOrigin',p:100,// int: true,
8817
8817
  d:function d(nodeName){if(nodeName===exports.Shape.CIRCLE||nodeName===exports.Shape.ELLIPSE){return 'center';}if(nodeName===exports.Shape.TEXT){return 'text-anchor';}return 'left top';},l:true,syntax:exports.PropertySyntax.TRANSFORM_ORIGIN},{n:'anchor',p:99,d:function d(nodeName){if(nodeName===exports.Shape.CIRCLE||nodeName===exports.Shape.ELLIPSE){return '0.5 0.5';}return '0 0';},l:true,syntax:exports.PropertySyntax.LENGTH_PERCENTAGE_12},// <circle> & <ellipse>
8818
- {n:'cx',int:true,d:'0',syntax:exports.PropertySyntax.COORDINATE},{n:'cy',int:true,d:'0',syntax:exports.PropertySyntax.COORDINATE},{n:'r',int:true,l:true,d:'0',syntax:exports.PropertySyntax.LENGTH_PERCENTAGE},{n:'rx',int:true,l:true,d:'0',syntax:exports.PropertySyntax.LENGTH_PERCENTAGE},{n:'ry',int:true,l:true,d:'0',syntax:exports.PropertySyntax.LENGTH_PERCENTAGE},// Rect Image Group
8818
+ {n:'cx',int:true,d:'0',syntax:exports.PropertySyntax.COORDINATE},{n:'cy',int:true,d:'0',syntax:exports.PropertySyntax.COORDINATE},{n:'cz',int:true,d:'0',syntax:exports.PropertySyntax.COORDINATE},{n:'r',int:true,l:true,d:'0',syntax:exports.PropertySyntax.LENGTH_PERCENTAGE},{n:'rx',int:true,l:true,d:'0',syntax:exports.PropertySyntax.LENGTH_PERCENTAGE},{n:'ry',int:true,l:true,d:'0',syntax:exports.PropertySyntax.LENGTH_PERCENTAGE},// Rect Image Group
8819
8819
  {// x in local space
8820
8820
  n:'x',int:true,d:'0',syntax:exports.PropertySyntax.COORDINATE},{// y in local space
8821
8821
  n:'y',int:true,d:'0',syntax:exports.PropertySyntax.COORDINATE},{// z in local space
@@ -8968,7 +8968,7 @@
8968
8968
  // );
8969
8969
  // anchor is center by default, don't account for lineWidth here
8970
8970
  var stroke=parsedStyle.stroke,lineWidth=parsedStyle.lineWidth,increasedLineWidthForHitTesting=parsedStyle.increasedLineWidthForHitTesting,shadowType=parsedStyle.shadowType,shadowColor=parsedStyle.shadowColor,_parsedStyle$filter=parsedStyle.filter,filter=_parsedStyle$filter===void 0?[]:_parsedStyle$filter,transformOrigin=parsedStyle.transformOrigin;var anchor=parsedStyle.anchor;// <Text> use textAlign & textBaseline instead of anchor
8971
- if(nodeName===exports.Shape.TEXT){delete parsedStyle.anchor;}var center=[(1-(anchor&&anchor[0]||0)*2)*width/2+offsetX,(1-(anchor&&anchor[1]||0)*2)*height/2+offsetY,(1-(anchor&&anchor[2]||0)*2)*halfExtents[2]+offsetZ];// const center = vec3.set(
8971
+ if(nodeName===exports.Shape.TEXT){delete parsedStyle.anchor;}else if(nodeName===exports.Shape.MESH){parsedStyle.anchor[2]=0.5;}var center=[(1-(anchor&&anchor[0]||0)*2)*width/2+offsetX,(1-(anchor&&anchor[1]||0)*2)*height/2+offsetY,(1-(anchor&&anchor[2]||0)*2)*halfExtents[2]+offsetZ];// const center = vec3.set(
8972
8972
  // tmpVec3b,
8973
8973
  // ((1 - ((anchor && anchor[0]) || 0) * 2) * width) / 2 + offsetX,
8974
8974
  // ((1 - ((anchor && anchor[1]) || 0) * 2) * height) / 2 + offsetY,