@antv/g 5.16.20 → 5.16.22

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
@@ -7908,7 +7908,7 @@
7908
7908
  * local position
7909
7909
  */var CSSPropertyLocalPosition=/*#__PURE__*/function(_CSSPropertyLengthOrP){_inheritsLoose(CSSPropertyLocalPosition,_CSSPropertyLengthOrP);function CSSPropertyLocalPosition(){return _CSSPropertyLengthOrP.apply(this,arguments)||this;}var _proto=CSSPropertyLocalPosition.prototype;/**
7910
7910
  * update local position
7911
- */_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;}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
7911
+ */_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
7912
7912
  if(needResetLocalPosition&&attributes.indexOf('transform')===-1){// account for current transform if needed
7913
7913
  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
7914
7914
  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
@@ -8187,7 +8187,12 @@
8187
8187
  * @see https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition
8188
8188
  * @see https://github.com/b-fuze/deno-dom/blob/master/src/dom/node.ts#L338
8189
8189
  */_proto.compareDocumentPosition=function compareDocumentPosition(other){if(other===this){// same node
8190
- return 0;}if(!(other instanceof Node)){throw new TypeError('Node.compareDocumentPosition: Argument 1 does not implement interface Node.');}var node1Root=other;// eslint-disable-next-line @typescript-eslint/no-this-alias
8190
+ return 0;}// if (!(other instanceof Node)) {
8191
+ // throw new TypeError(
8192
+ // 'Node.compareDocumentPosition: Argument 1 does not implement interface Node.',
8193
+ // );
8194
+ // }
8195
+ var node1Root=other;// eslint-disable-next-line @typescript-eslint/no-this-alias
8191
8196
  var node2Root=this;var node1Hierarchy=[node1Root];var node2Hierarchy=[node2Root];while((_node1Root$parentNode=node1Root.parentNode)!==null&&_node1Root$parentNode!==void 0?_node1Root$parentNode:node2Root.parentNode){var _node1Root$parentNode;node1Root=node1Root.parentNode?(node1Hierarchy.push(node1Root.parentNode),node1Root.parentNode):node1Root;node2Root=node2Root.parentNode?(node2Hierarchy.push(node2Root.parentNode),node2Root.parentNode):node2Root;}// Check if they don't share the same root node
8192
8197
  if(node1Root!==node2Root){return Node.DOCUMENT_POSITION_DISCONNECTED|Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|Node.DOCUMENT_POSITION_PRECEDING;}var longerHierarchy=node1Hierarchy.length>node2Hierarchy.length?node1Hierarchy:node2Hierarchy;var shorterHierarchy=longerHierarchy===node1Hierarchy?node2Hierarchy:node1Hierarchy;// Check if either is a container of the other
8193
8198
  if(longerHierarchy[longerHierarchy.length-shorterHierarchy.length]===shorterHierarchy[0]){return longerHierarchy===node1Hierarchy?// other is a child of this
@@ -8755,7 +8760,7 @@
8755
8760
  // LENGTHADJUST_SPACINGANDGLYPHS: number = 2;
8756
8761
  // LENGTHADJUST_UNKNOWN: number = 0;
8757
8762
  function Text(_temp){var _ref=_temp===void 0?{}:_temp,style=_ref.style,rest=_objectWithoutPropertiesLoose(_ref,_excluded$b);return _DisplayObject.call(this,_extends({type:exports.Shape.TEXT,style:runtime.enableCSSParsing?_extends({x:'',y:'',text:'',fontSize:'',fontFamily:'',fontStyle:'',fontWeight:'',fontVariant:'',textAlign:'',textBaseline:'',textTransform:'',fill:'black',letterSpacing:'',lineHeight:'',miterLimit:'',// whiteSpace: 'pre',
8758
- wordWrap:false,wordWrapWidth:0,leading:0,dx:'',dy:''},style):_extends({fill:'black'},style),initialParsedStyle:runtime.enableCSSParsing?{}:{x:0,y:0,fontSize:16,fontFamily:'sans-serif',fontStyle:'normal',fontWeight:'normal',fontVariant:'normal',lineHeight:0,letterSpacing:0,textBaseline:'alphabetic',textAlign:'start',wordWrap:false,wordWrapWidth:0,leading:0,dx:0,dy:0}},rest))||this;}// lengthAdjust: SVGAnimatedEnumeration;
8763
+ wordWrap:false,wordWrapWidth:0,leading:0,dx:'',dy:'',isBillboard:false,sizeAttenuation:true},style):_extends({fill:'black'},style),initialParsedStyle:runtime.enableCSSParsing?{}:{x:0,y:0,fontSize:16,fontFamily:'sans-serif',fontStyle:'normal',fontWeight:'normal',fontVariant:'normal',lineHeight:0,letterSpacing:0,textBaseline:'alphabetic',textAlign:'start',wordWrap:false,wordWrapWidth:0,leading:0,dx:0,dy:0,isBillboard:false,sizeAttenuation:true}},rest))||this;}// lengthAdjust: SVGAnimatedEnumeration;
8759
8764
  // textLength: SVGAnimatedLength;
8760
8765
  // getCharNumAtPosition(point?: DOMPointInit): number {
8761
8766
  // throw new Error('Method not implemented.');
@@ -9900,7 +9905,7 @@
9900
9905
  _this2.setRoll(interRoll);
9901
9906
  _this2.setZoom(interZoom);
9902
9907
  var dist$1 = dist(interFocalPoint, destFocalPoint) + dist(interPosition, destPosition);
9903
- if (dist$1 <= epsilon) {
9908
+ if (dist$1 <= epsilon && destZoom == undefined && destRoll == undefined) {
9904
9909
  endAnimation();
9905
9910
  return;
9906
9911
  }