@antv/g-lite 2.0.3 → 2.0.4

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.js CHANGED
@@ -9522,8 +9522,10 @@ var EventService = /** @class */ (function () {
9522
9522
  var $el = this.context.contextService.getDomElement();
9523
9523
  if ($el && bbox) {
9524
9524
  var offsetWidth = $el.offsetWidth, offsetHeight = $el.offsetHeight;
9525
- scaleX = bbox.width / offsetWidth;
9526
- scaleY = bbox.height / offsetHeight;
9525
+ if (offsetWidth && offsetHeight) {
9526
+ scaleX = bbox.width / offsetWidth;
9527
+ scaleY = bbox.height / offsetHeight;
9528
+ }
9527
9529
  }
9528
9530
  return {
9529
9531
  scaleX: scaleX,