@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.esm.js CHANGED
@@ -9501,8 +9501,10 @@ var EventService = /** @class */ (function () {
9501
9501
  var $el = this.context.contextService.getDomElement();
9502
9502
  if ($el && bbox) {
9503
9503
  var offsetWidth = $el.offsetWidth, offsetHeight = $el.offsetHeight;
9504
- scaleX = bbox.width / offsetWidth;
9505
- scaleY = bbox.height / offsetHeight;
9504
+ if (offsetWidth && offsetHeight) {
9505
+ scaleX = bbox.width / offsetWidth;
9506
+ scaleY = bbox.height / offsetHeight;
9507
+ }
9506
9508
  }
9507
9509
  return {
9508
9510
  scaleX: scaleX,