@antv/g 5.16.27 → 5.16.28

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
@@ -9287,8 +9287,8 @@
9287
9287
  var sortable=displayObject.sortable;if(sortable.dirty){this.sort(displayObject,sortable);sortable.dirty=false;sortable.dirtyChildren=[];sortable.dirtyReason=undefined;}// recursive rendering its children
9288
9288
  (sortable.sorted||displayObject.childNodes).forEach(function(child){_this2.renderDisplayObject(child,canvasConfig,renderingContext);});};_proto.sort=function sort(displayObject,sortable){if(sortable.sorted&&sortable.dirtyReason!==exports.SortReason.Z_INDEX_CHANGED){// avoid re-sorting the whole children list
9289
9289
  sortable.dirtyChildren.forEach(function(child){var index=displayObject.childNodes.indexOf(child);if(index===-1){// remove from sorted list
9290
- var _index=sortable.sorted.indexOf(child);sortable.sorted.splice(_index,1);}else {var zIndex=Number(child.parsedStyle.zIndex);var firstZIndex=Number(sortable.sorted[0].parsedStyle.zIndex);var lastZIndex=Number(sortable.sorted[sortable.sorted.length-1].parsedStyle.zIndex);if(zIndex<firstZIndex){sortable.sorted.unshift(child);}else if(zIndex>lastZIndex){sortable.sorted.push(child);}else {// insert into sorted list
9291
- for(var i=0;i<sortable.sorted.length;i++){var _sortable$sorted,_sortable$sorted$i;var prevZIndex=Number((_sortable$sorted=sortable.sorted[i-1])===null||_sortable$sorted===void 0?void 0:_sortable$sorted.parsedStyle.zIndex)||-Infinity;var currentZIndex=Number((_sortable$sorted$i=sortable.sorted[i])===null||_sortable$sorted$i===void 0?void 0:_sortable$sorted$i.parsedStyle.zIndex);if(zIndex>prevZIndex&&zIndex<currentZIndex){sortable.sorted.splice(i,0,child);break;}if(zIndex===currentZIndex){var currentIndex=displayObject.childNodes.indexOf(sortable.sorted[i]);var nextIndex=displayObject.childNodes.indexOf(sortable.sorted[i+1])||Infinity;if(index>currentIndex&&index<nextIndex){sortable.sorted.splice(i+1,0,child);break;}}}}}});}else {sortable.sorted=displayObject.childNodes.slice().sort(sortByZIndex);}};_proto.destroy=function destroy(){this.inited=false;this.hooks.destroy.call();this.globalRuntime.sceneGraphService.clearPendingEvents();};_proto.dirtify=function dirtify(){// need re-render
9290
+ var _index=sortable.sorted.indexOf(child);sortable.sorted.splice(_index,1);}else {if(sortable.sorted.length===0){sortable.sorted.push(child);}else {var zIndex=Number(child.parsedStyle.zIndex);var firstZIndex=Number(sortable.sorted[0].parsedStyle.zIndex);var lastZIndex=Number(sortable.sorted[sortable.sorted.length-1].parsedStyle.zIndex);if(zIndex<firstZIndex){sortable.sorted.unshift(child);}else if(zIndex>lastZIndex){sortable.sorted.push(child);}else {// insert into sorted list
9291
+ for(var i=0;i<sortable.sorted.length;i++){var _sortable$sorted,_sortable$sorted$i;var prevZIndex=Number((_sortable$sorted=sortable.sorted[i-1])===null||_sortable$sorted===void 0?void 0:_sortable$sorted.parsedStyle.zIndex)||-Infinity;var currentZIndex=Number((_sortable$sorted$i=sortable.sorted[i])===null||_sortable$sorted$i===void 0?void 0:_sortable$sorted$i.parsedStyle.zIndex);if(zIndex>prevZIndex&&zIndex<currentZIndex){sortable.sorted.splice(i,0,child);break;}if(zIndex===currentZIndex){var currentIndex=displayObject.childNodes.indexOf(sortable.sorted[i]);var nextIndex=displayObject.childNodes.indexOf(sortable.sorted[i+1])||Infinity;if(index>currentIndex&&index<nextIndex){sortable.sorted.splice(i+1,0,child);break;}}}}}}});}else {sortable.sorted=displayObject.childNodes.slice().sort(sortByZIndex);}};_proto.destroy=function destroy(){this.inited=false;this.hooks.destroy.call();this.globalRuntime.sceneGraphService.clearPendingEvents();};_proto.dirtify=function dirtify(){// need re-render
9292
9292
  this.context.renderingContext.renderReasons.add(exports.RenderReason.DISPLAY_OBJECT_CHANGED);};return RenderingService;}();var ATTRIBUTE_REGEXP=/\[\s*(.*)=(.*)\s*\]/;/**
9293
9293
  * support the following DOM API:
9294
9294
  * * getElementById