@antv/g-lite 1.3.0-next.14 → 1.3.0-next.15

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.esm.js CHANGED
@@ -14712,6 +14712,7 @@ var PrepareRendererPlugin = /** @class */ (function () {
14712
14712
  }
14713
14713
  PrepareRendererPlugin.prototype.apply = function (context) {
14714
14714
  var _this = this;
14715
+ var _a;
14715
14716
  var renderingService = context.renderingService, renderingContext = context.renderingContext, rBushRoot = context.rBushRoot;
14716
14717
  var canvas = renderingContext.root.ownerDocument.defaultView;
14717
14718
  this.rBush = rBushRoot;
@@ -14770,11 +14771,12 @@ var PrepareRendererPlugin = /** @class */ (function () {
14770
14771
  canvas.removeEventListener(ElementEvent.BOUNDS_CHANGED, handleBoundsChanged);
14771
14772
  _this.toSync.clear();
14772
14773
  });
14774
+ var ric = (_a = runtime.globalThis.requestIdleCallback) !== null && _a !== void 0 ? _a : raf.bind(runtime.globalThis);
14773
14775
  renderingService.hooks.endFrame.tap(PrepareRendererPlugin.tag, function () {
14774
14776
  if (_this.isFirstTimeRendering) {
14775
14777
  _this.isFirstTimeRendering = false;
14776
14778
  _this.syncing = true;
14777
- requestIdleCallback(function () {
14779
+ ric(function () {
14778
14780
  _this.syncRTree(true);
14779
14781
  });
14780
14782
  }