@antv/s2
Version:
effective spreadsheet render core lib
30 lines • 957 B
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BaseBBox = void 0;
// BBox相同数据结构,便于已有逻辑的直接复用
class BaseBBox {
constructor(facet, autoCalculateBBoxWhenCreated = false) {
this.x = 0;
this.y = 0;
this.minX = 0;
this.minY = 0;
this.maxX = 0;
this.maxY = 0;
this.width = 0;
this.height = 0;
// 记录未裁剪时的原始宽高
this.originalWidth = 0;
this.originalHeight = 0;
// 视口宽高,数据少时可能小于 bbox 的宽高
this.viewportHeight = 0;
this.viewportWidth = 0;
this.facet = facet;
this.spreadsheet = facet.spreadsheet;
this.layoutResult = facet.getLayoutResult();
if (autoCalculateBBoxWhenCreated) {
this.calculateBBox();
}
}
}
exports.BaseBBox = BaseBBox;
//# sourceMappingURL=base-bbox.js.map