@visactor/vrender-components 1.0.14-alpha.0 → 1.0.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/cjs/index.d.ts +2 -1
- package/cjs/index.js +3 -2
- package/cjs/index.js.map +1 -1
- package/cjs/table-series-number/event-manager.d.ts +16 -0
- package/cjs/table-series-number/event-manager.js +160 -0
- package/cjs/table-series-number/event-manager.js.map +1 -0
- package/cjs/table-series-number/index.d.ts +2 -0
- package/cjs/table-series-number/index.js +21 -0
- package/cjs/table-series-number/index.js.map +1 -0
- package/cjs/table-series-number/register.d.ts +1 -0
- package/cjs/table-series-number/register.js +14 -0
- package/cjs/table-series-number/register.js.map +1 -0
- package/cjs/table-series-number/table-series-number.d.ts +76 -0
- package/cjs/table-series-number/table-series-number.js +536 -0
- package/cjs/table-series-number/table-series-number.js.map +1 -0
- package/cjs/table-series-number/tools.d.ts +1 -0
- package/cjs/table-series-number/tools.js +14 -0
- package/cjs/table-series-number/tools.js.map +1 -0
- package/cjs/table-series-number/type.d.ts +80 -0
- package/cjs/table-series-number/type.js +17 -0
- package/cjs/table-series-number/type.js.map +1 -0
- package/dist/index.es.js +999 -4
- package/es/index.d.ts +2 -1
- package/es/index.js +3 -1
- package/es/index.js.map +1 -1
- package/es/table-series-number/event-manager.d.ts +16 -0
- package/es/table-series-number/event-manager.js +154 -0
- package/es/table-series-number/event-manager.js.map +1 -0
- package/es/table-series-number/index.d.ts +2 -0
- package/es/table-series-number/index.js +4 -0
- package/es/table-series-number/index.js.map +1 -0
- package/es/table-series-number/register.d.ts +1 -0
- package/es/table-series-number/register.js +6 -0
- package/es/table-series-number/register.js.map +1 -0
- package/es/table-series-number/table-series-number.d.ts +76 -0
- package/es/table-series-number/table-series-number.js +544 -0
- package/es/table-series-number/table-series-number.js.map +1 -0
- package/es/table-series-number/tools.d.ts +1 -0
- package/es/table-series-number/tools.js +8 -0
- package/es/table-series-number/tools.js.map +1 -0
- package/es/table-series-number/type.d.ts +80 -0
- package/es/table-series-number/type.js +16 -0
- package/es/table-series-number/type.js.map +1 -0
- package/package.json +6 -6
package/dist/index.es.js
CHANGED
|
@@ -7848,7 +7848,7 @@ class Text extends Graphic {
|
|
|
7848
7848
|
this.cache.layoutData.lines.forEach(item => {
|
|
7849
7849
|
mergedText += item.str;
|
|
7850
7850
|
});
|
|
7851
|
-
return (Array.isArray(text) ? text.join("") : text) !== mergedText;
|
|
7851
|
+
return (Array.isArray(text) ? text.join("") : text).toString() !== mergedText;
|
|
7852
7852
|
}
|
|
7853
7853
|
return "vertical" === attribute.direction && this.cache.verticalList && this.cache.verticalList[0] ? this.cache.verticalList[0].map(item => item.text).join("") !== attribute.text.toString() : null != this.clipedText && this.clipedText !== attribute.text.toString();
|
|
7854
7854
|
}
|
|
@@ -11136,7 +11136,7 @@ let DefaultCanvasArcRender = class extends BaseRender {
|
|
|
11136
11136
|
doFill && (fillCb ? fillCb(context, arc.attribute, arcAttribute) : fVisible && (context.setCommonStyle(arc, arc.attribute, originX - x, originY - y, arcAttribute), context.fill()));
|
|
11137
11137
|
}
|
|
11138
11138
|
_runStroke(arc, context, x, y, arcAttribute, doStroke, isFullStroke, sVisible, strokeCb) {
|
|
11139
|
-
doStroke && isFullStroke && (strokeCb
|
|
11139
|
+
doStroke && isFullStroke && (strokeCb ? strokeCb(context, arc.attribute, arcAttribute) : sVisible && (context.setStrokeStyle(arc, arc.attribute, x, y, arcAttribute), context.stroke()));
|
|
11140
11140
|
}
|
|
11141
11141
|
draw(arc, renderService, drawContext, params) {
|
|
11142
11142
|
const arcAttribute = getTheme(arc, null == params ? void 0 : params.theme).arc;
|
|
@@ -33195,6 +33195,1001 @@ StoryLabelItem.defaultAttributes = {
|
|
|
33195
33195
|
theme: 'default'
|
|
33196
33196
|
};
|
|
33197
33197
|
|
|
33198
|
-
|
|
33198
|
+
function generateColField(index) {
|
|
33199
|
+
if (index < 26) {
|
|
33200
|
+
return String.fromCharCode(65 + index);
|
|
33201
|
+
}
|
|
33202
|
+
const title = [];
|
|
33203
|
+
index++;
|
|
33204
|
+
while (index > 0) {
|
|
33205
|
+
index--;
|
|
33206
|
+
title.unshift(String.fromCharCode(65 + (index % 26)));
|
|
33207
|
+
index = Math.floor(index / 26);
|
|
33208
|
+
}
|
|
33209
|
+
return title.join('');
|
|
33210
|
+
}
|
|
33211
|
+
|
|
33212
|
+
var SeriesNumberCellStateValue;
|
|
33213
|
+
(function (SeriesNumberCellStateValue) {
|
|
33214
|
+
SeriesNumberCellStateValue["hover"] = "hover";
|
|
33215
|
+
SeriesNumberCellStateValue["select"] = "select";
|
|
33216
|
+
})(SeriesNumberCellStateValue || (SeriesNumberCellStateValue = {}));
|
|
33217
|
+
var SeriesNumberEvent;
|
|
33218
|
+
(function (SeriesNumberEvent) {
|
|
33219
|
+
SeriesNumberEvent["seriesNumberCellHover"] = "seriesNumberCellHover";
|
|
33220
|
+
SeriesNumberEvent["seriesNumberCellUnHover"] = "seriesNumberCellUnHover";
|
|
33221
|
+
SeriesNumberEvent["seriesNumberCellClick"] = "seriesNumberCellClick";
|
|
33222
|
+
SeriesNumberEvent["seriesNumberCellClickUp"] = "seriesNumberCellClickUp";
|
|
33223
|
+
SeriesNumberEvent["seriesNumberCellCancelClick"] = "seriesNumberCellCancelClick";
|
|
33224
|
+
SeriesNumberEvent["rowSeriesNumberWidthChange"] = "rowSeriesNumberWidthChange";
|
|
33225
|
+
SeriesNumberEvent["resizeRowHeightStart"] = "resizeRowHeightStart";
|
|
33226
|
+
SeriesNumberEvent["resizeColWidthStart"] = "resizeColWidthStart";
|
|
33227
|
+
SeriesNumberEvent["seriesNumberCellRightClick"] = "seriesNumberCellRightClick";
|
|
33228
|
+
})(SeriesNumberEvent || (SeriesNumberEvent = {}));
|
|
33229
|
+
|
|
33230
|
+
class TableSeriesNumberEventManager {
|
|
33231
|
+
constructor(tableSeriesNumber) {
|
|
33232
|
+
this.isPointerDownStartSelect = false;
|
|
33233
|
+
this._onRightDown = (e) => {
|
|
33234
|
+
const target = e.target;
|
|
33235
|
+
this._tableSeriesNumber.dispatchTableSeriesNumberEvent(SeriesNumberEvent.seriesNumberCellRightClick, {
|
|
33236
|
+
seriesNumberCell: target,
|
|
33237
|
+
event: e
|
|
33238
|
+
});
|
|
33239
|
+
};
|
|
33240
|
+
this._onPointermove = (e) => {
|
|
33241
|
+
const target = e.target;
|
|
33242
|
+
if (this.isPointerDownStartSelect) {
|
|
33243
|
+
if (!this._tableSeriesNumber.interactionState.selectIndexs.has(target.name)) {
|
|
33244
|
+
this._tableSeriesNumber.interactionState.selectIndexs.add(target.name);
|
|
33245
|
+
this._tableSeriesNumber.renderSelectedIndexsState();
|
|
33246
|
+
this._tableSeriesNumber.dispatchTableSeriesNumberEvent(SeriesNumberEvent.seriesNumberCellClick, {
|
|
33247
|
+
seriesNumberCell: target,
|
|
33248
|
+
event: e,
|
|
33249
|
+
isDragSelect: true
|
|
33250
|
+
});
|
|
33251
|
+
}
|
|
33252
|
+
else {
|
|
33253
|
+
if (this._tableSeriesNumber.interactionState._lastClickItem &&
|
|
33254
|
+
this._tableSeriesNumber.interactionState._lastClickItem.id === target.id) {
|
|
33255
|
+
return;
|
|
33256
|
+
}
|
|
33257
|
+
this._tableSeriesNumber.renderSelectedIndexsState();
|
|
33258
|
+
this._tableSeriesNumber.dispatchTableSeriesNumberEvent(SeriesNumberEvent.seriesNumberCellClick, {
|
|
33259
|
+
seriesNumberCell: target,
|
|
33260
|
+
event: e,
|
|
33261
|
+
isDragSelect: true
|
|
33262
|
+
});
|
|
33263
|
+
}
|
|
33264
|
+
this._tableSeriesNumber.interactionState._lastClickItem = target;
|
|
33265
|
+
return;
|
|
33266
|
+
}
|
|
33267
|
+
if (target.name.startsWith('col')) {
|
|
33268
|
+
Number(target.name.split('-')[1]);
|
|
33269
|
+
const canvasPointXY = target.stage.window.pointTransform(e.canvasX, e.canvasY);
|
|
33270
|
+
const XYtoTarget = { x: 0, y: 0 };
|
|
33271
|
+
target.globalTransMatrix.transformPoint(canvasPointXY, XYtoTarget);
|
|
33272
|
+
if (XYtoTarget.x <= 4 ||
|
|
33273
|
+
(XYtoTarget.x <= target.getAttributes().width && XYtoTarget.x >= target.getAttributes().width - 4)) {
|
|
33274
|
+
target.setAttribute('cursor', 'col-resize');
|
|
33275
|
+
}
|
|
33276
|
+
else {
|
|
33277
|
+
target.setAttribute('cursor', 'default');
|
|
33278
|
+
}
|
|
33279
|
+
}
|
|
33280
|
+
else if (target.name.startsWith('row')) {
|
|
33281
|
+
Number(target.name.split('-')[1]);
|
|
33282
|
+
const canvasPointXY = target.stage.window.pointTransform(e.canvasX, e.canvasY);
|
|
33283
|
+
const XYtoTarget = { x: 0, y: 0 };
|
|
33284
|
+
target.globalTransMatrix.transformPoint(canvasPointXY, XYtoTarget);
|
|
33285
|
+
if (XYtoTarget.y <= 4 ||
|
|
33286
|
+
(XYtoTarget.y <= target.getAttributes().height && XYtoTarget.y >= target.getAttributes().height - 4)) {
|
|
33287
|
+
target.setAttribute('cursor', 'row-resize');
|
|
33288
|
+
}
|
|
33289
|
+
else {
|
|
33290
|
+
target.setAttribute('cursor', 'default');
|
|
33291
|
+
}
|
|
33292
|
+
}
|
|
33293
|
+
if (this._tableSeriesNumber.interactionState._lastHoverItem) {
|
|
33294
|
+
if (this._tableSeriesNumber.interactionState._lastHoverItem.id === target.id) {
|
|
33295
|
+
return;
|
|
33296
|
+
}
|
|
33297
|
+
this._unHoverHandler(this._tableSeriesNumber.interactionState._lastHoverItem, e);
|
|
33298
|
+
}
|
|
33299
|
+
if (this._tableSeriesNumber.getAttributes().hover) {
|
|
33300
|
+
this._hoverHandler(target, e);
|
|
33301
|
+
}
|
|
33302
|
+
};
|
|
33303
|
+
this._onPointerleave = (e) => {
|
|
33304
|
+
if (this._tableSeriesNumber.interactionState._lastHoverItem) {
|
|
33305
|
+
this._unHoverHandler(this._tableSeriesNumber.interactionState._lastHoverItem, e);
|
|
33306
|
+
this._tableSeriesNumber.interactionState._lastHoverItem = null;
|
|
33307
|
+
}
|
|
33308
|
+
};
|
|
33309
|
+
this._onPointerdown = (e) => {
|
|
33310
|
+
var _a;
|
|
33311
|
+
if (e.button === 2) {
|
|
33312
|
+
return;
|
|
33313
|
+
}
|
|
33314
|
+
const target = e.target;
|
|
33315
|
+
if (target.name.startsWith('col')) {
|
|
33316
|
+
const colIndex = Number(target.name.split('-')[1]);
|
|
33317
|
+
const canvasPointXY = target.stage.window.pointTransform(e.canvasX, e.canvasY);
|
|
33318
|
+
const XYtoTarget = { x: 0, y: 0 };
|
|
33319
|
+
target.globalTransMatrix.transformPoint(canvasPointXY, XYtoTarget);
|
|
33320
|
+
if (XYtoTarget.x <= 4 ||
|
|
33321
|
+
(XYtoTarget.x <= target.getAttributes().width && XYtoTarget.x >= target.getAttributes().width - 4)) {
|
|
33322
|
+
let resizeTargetColIndex = colIndex;
|
|
33323
|
+
if (XYtoTarget.x <= 4) {
|
|
33324
|
+
resizeTargetColIndex = colIndex - 1;
|
|
33325
|
+
}
|
|
33326
|
+
this._tableSeriesNumber.dispatchTableSeriesNumberEvent(SeriesNumberEvent.resizeColWidthStart, {
|
|
33327
|
+
colIndex: resizeTargetColIndex,
|
|
33328
|
+
event: e
|
|
33329
|
+
});
|
|
33330
|
+
return;
|
|
33331
|
+
}
|
|
33332
|
+
}
|
|
33333
|
+
else if (target.name.startsWith('row')) {
|
|
33334
|
+
const rowIndex = Number(target.name.split('-')[1]);
|
|
33335
|
+
const canvasPointXY = target.stage.window.pointTransform(e.canvasX, e.canvasY);
|
|
33336
|
+
const XYtoTarget = { x: 0, y: 0 };
|
|
33337
|
+
target.globalTransMatrix.transformPoint(canvasPointXY, XYtoTarget);
|
|
33338
|
+
if (XYtoTarget.y <= 4 ||
|
|
33339
|
+
(XYtoTarget.y <= target.getAttributes().height && XYtoTarget.y >= target.getAttributes().height - 4)) {
|
|
33340
|
+
let resizeTargetRowIndex = rowIndex;
|
|
33341
|
+
if (XYtoTarget.y <= 4) {
|
|
33342
|
+
resizeTargetRowIndex = rowIndex - 1;
|
|
33343
|
+
}
|
|
33344
|
+
this._tableSeriesNumber.dispatchTableSeriesNumberEvent(SeriesNumberEvent.resizeRowHeightStart, {
|
|
33345
|
+
rowIndex: resizeTargetRowIndex,
|
|
33346
|
+
event: e
|
|
33347
|
+
});
|
|
33348
|
+
return;
|
|
33349
|
+
}
|
|
33350
|
+
}
|
|
33351
|
+
this.isPointerDownStartSelect = true;
|
|
33352
|
+
if ((_a = this._tableSeriesNumber.interactionState.selectIndexs) === null || _a === void 0 ? void 0 : _a.size) {
|
|
33353
|
+
if (this._tableSeriesNumber.interactionState.selectIndexs.has(target.name)) {
|
|
33354
|
+
if (e.nativeEvent.ctrlKey || e.nativeEvent.metaKey) {
|
|
33355
|
+
this._tableSeriesNumber.removeOneGroupSelected(target);
|
|
33356
|
+
this._unClickHandler(target.name, e);
|
|
33357
|
+
}
|
|
33358
|
+
else {
|
|
33359
|
+
this._tableSeriesNumber.removeAllSelectedIndexs();
|
|
33360
|
+
for (const name of this._tableSeriesNumber.interactionState.selectIndexs) {
|
|
33361
|
+
this._unClickHandler(name, e);
|
|
33362
|
+
}
|
|
33363
|
+
}
|
|
33364
|
+
}
|
|
33365
|
+
else {
|
|
33366
|
+
if (e.nativeEvent.ctrlKey || e.nativeEvent.metaKey) ;
|
|
33367
|
+
else {
|
|
33368
|
+
this._tableSeriesNumber.removeAllSelectedIndexs();
|
|
33369
|
+
for (const name of this._tableSeriesNumber.interactionState.selectIndexs) {
|
|
33370
|
+
if ((target.name.startsWith('row') && name.startsWith('row')) ||
|
|
33371
|
+
(target.name.startsWith('col') && name.startsWith('col'))) {
|
|
33372
|
+
this._unClickHandler(name, e);
|
|
33373
|
+
}
|
|
33374
|
+
}
|
|
33375
|
+
}
|
|
33376
|
+
}
|
|
33377
|
+
}
|
|
33378
|
+
this._clickHandler(target, e);
|
|
33379
|
+
};
|
|
33380
|
+
this._onPointerup = (e) => {
|
|
33381
|
+
const target = e.target;
|
|
33382
|
+
if (this.isPointerDownStartSelect) {
|
|
33383
|
+
this.isPointerDownStartSelect = false;
|
|
33384
|
+
this._tableSeriesNumber.interactionState._lastClickItem = null;
|
|
33385
|
+
this._tableSeriesNumber.dispatchTableSeriesNumberEvent(SeriesNumberEvent.seriesNumberCellClickUp, {
|
|
33386
|
+
seriesNumberCell: target,
|
|
33387
|
+
event: e
|
|
33388
|
+
});
|
|
33389
|
+
}
|
|
33390
|
+
};
|
|
33391
|
+
this._tableSeriesNumber = tableSeriesNumber;
|
|
33392
|
+
}
|
|
33393
|
+
bindEvents() {
|
|
33394
|
+
const { hover = true, select = true } = this._tableSeriesNumber.attribute;
|
|
33395
|
+
if (hover) {
|
|
33396
|
+
this._tableSeriesNumber._rowSeriesNumberGroup.addEventListener('pointermove', this._onPointermove);
|
|
33397
|
+
this._tableSeriesNumber._rowSeriesNumberGroup.addEventListener('pointerleave', this._onPointerleave);
|
|
33398
|
+
this._tableSeriesNumber._colSeriesNumberGroup.addEventListener('pointermove', this._onPointermove);
|
|
33399
|
+
this._tableSeriesNumber._colSeriesNumberGroup.addEventListener('pointerleave', this._onPointerleave);
|
|
33400
|
+
this._tableSeriesNumber._cornerGroup.addEventListener('pointermove', this._onPointermove);
|
|
33401
|
+
this._tableSeriesNumber._cornerGroup.addEventListener('pointerleave', this._onPointerleave);
|
|
33402
|
+
this._tableSeriesNumber._frozenTopRowSeriesNumberGroup.addEventListener('pointermove', this._onPointermove);
|
|
33403
|
+
this._tableSeriesNumber._frozenTopRowSeriesNumberGroup.addEventListener('pointerleave', this._onPointerleave);
|
|
33404
|
+
this._tableSeriesNumber._frozenLeftColSeriesNumberGroup.addEventListener('pointermove', this._onPointermove);
|
|
33405
|
+
this._tableSeriesNumber._frozenLeftColSeriesNumberGroup.addEventListener('pointerleave', this._onPointerleave);
|
|
33406
|
+
}
|
|
33407
|
+
if (select) {
|
|
33408
|
+
this._tableSeriesNumber._rowSeriesNumberGroup.addEventListener('pointerdown', this._onPointerdown);
|
|
33409
|
+
this._tableSeriesNumber._colSeriesNumberGroup.addEventListener('pointerdown', this._onPointerdown);
|
|
33410
|
+
this._tableSeriesNumber._cornerGroup.addEventListener('pointerdown', this._onPointerdown);
|
|
33411
|
+
this._tableSeriesNumber._frozenTopRowSeriesNumberGroup.addEventListener('pointerdown', this._onPointerdown);
|
|
33412
|
+
this._tableSeriesNumber._frozenLeftColSeriesNumberGroup.addEventListener('pointerdown', this._onPointerdown);
|
|
33413
|
+
vglobal.addEventListener('pointerup', this._onPointerup);
|
|
33414
|
+
}
|
|
33415
|
+
this._tableSeriesNumber._rowSeriesNumberGroup.addEventListener('rightdown', this._onRightDown);
|
|
33416
|
+
this._tableSeriesNumber._colSeriesNumberGroup.addEventListener('rightdown', this._onRightDown);
|
|
33417
|
+
this._tableSeriesNumber._cornerGroup.addEventListener('rightdown', this._onRightDown);
|
|
33418
|
+
this._tableSeriesNumber._frozenTopRowSeriesNumberGroup.addEventListener('rightdown', this._onRightDown);
|
|
33419
|
+
this._tableSeriesNumber._frozenLeftColSeriesNumberGroup.addEventListener('rightdown', this._onRightDown);
|
|
33420
|
+
}
|
|
33421
|
+
_hoverHandler(seriesNumberCell, e) {
|
|
33422
|
+
this._tableSeriesNumber.interactionState._lastHoverItem = seriesNumberCell;
|
|
33423
|
+
if (seriesNumberCell.hasState(SeriesNumberCellStateValue.select)) {
|
|
33424
|
+
seriesNumberCell.useStates([SeriesNumberCellStateValue.select, SeriesNumberCellStateValue.hover]);
|
|
33425
|
+
}
|
|
33426
|
+
else {
|
|
33427
|
+
seriesNumberCell.useStates([SeriesNumberCellStateValue.hover]);
|
|
33428
|
+
}
|
|
33429
|
+
this._tableSeriesNumber.dispatchTableSeriesNumberEvent(SeriesNumberEvent.seriesNumberCellHover, {
|
|
33430
|
+
seriesNumberCell,
|
|
33431
|
+
event: e
|
|
33432
|
+
});
|
|
33433
|
+
}
|
|
33434
|
+
_unHoverHandler(seriesNumberCell, e) {
|
|
33435
|
+
seriesNumberCell.removeState(SeriesNumberCellStateValue.hover);
|
|
33436
|
+
this._tableSeriesNumber.dispatchTableSeriesNumberEvent(SeriesNumberEvent.seriesNumberCellUnHover, {
|
|
33437
|
+
seriesNumberCell,
|
|
33438
|
+
event: e
|
|
33439
|
+
});
|
|
33440
|
+
}
|
|
33441
|
+
_clickHandler(seriesNumberCell, e) {
|
|
33442
|
+
this._tableSeriesNumber.addOneGroupSelected(seriesNumberCell);
|
|
33443
|
+
this._tableSeriesNumber.interactionState._lastClickItem = seriesNumberCell;
|
|
33444
|
+
this._tableSeriesNumber.dispatchTableSeriesNumberEvent(SeriesNumberEvent.seriesNumberCellClick, {
|
|
33445
|
+
seriesNumberCell,
|
|
33446
|
+
event: e
|
|
33447
|
+
});
|
|
33448
|
+
}
|
|
33449
|
+
_unClickHandler(seriesNumberIndex, e) {
|
|
33450
|
+
const isRow = seriesNumberIndex.startsWith('row');
|
|
33451
|
+
const seriesNumberCell = isRow
|
|
33452
|
+
? this._tableSeriesNumber.getRowSeriesNumberCellGroup(Number(seriesNumberIndex.split('-')[1]))
|
|
33453
|
+
: this._tableSeriesNumber.getColSeriesNumberCellGroup(Number(seriesNumberIndex.split('-')[1]));
|
|
33454
|
+
seriesNumberCell === null || seriesNumberCell === void 0 ? void 0 : seriesNumberCell.removeState(SeriesNumberCellStateValue.select);
|
|
33455
|
+
this._tableSeriesNumber.dispatchTableSeriesNumberEvent(SeriesNumberEvent.seriesNumberCellCancelClick, {
|
|
33456
|
+
index: seriesNumberIndex,
|
|
33457
|
+
event: e
|
|
33458
|
+
});
|
|
33459
|
+
}
|
|
33460
|
+
}
|
|
33461
|
+
|
|
33462
|
+
function loadTableSeriesNumberComponent() {
|
|
33463
|
+
registerGroup();
|
|
33464
|
+
registerText();
|
|
33465
|
+
registerImage();
|
|
33466
|
+
}
|
|
33467
|
+
|
|
33468
|
+
loadTableSeriesNumberComponent();
|
|
33469
|
+
class TableSeriesNumber extends AbstractComponent {
|
|
33470
|
+
constructor(attributes, options) {
|
|
33471
|
+
super((options === null || options === void 0 ? void 0 : options.skipDefault) ? attributes : merge({}, TableSeriesNumber.defaultAttributes, attributes));
|
|
33472
|
+
this.name = 'tableSeriesNumber';
|
|
33473
|
+
this._firstRowSeriesNumberIndex = 0;
|
|
33474
|
+
this._firstColSeriesNumberIndex = 0;
|
|
33475
|
+
this._maxTextWidth = 0;
|
|
33476
|
+
this._changeRowSeriesNumberWidthTimer = null;
|
|
33477
|
+
this.interactionState = { selectIndexs: new Set(), _lastHoverItem: null, _lastClickItem: null };
|
|
33478
|
+
this._parsedRowSeriesNumberCellPadding = [0, 0, 0, 0];
|
|
33479
|
+
this._parsedColSeriesNumberCellPadding = [0, 0, 0, 0];
|
|
33480
|
+
this.initRenderAll = false;
|
|
33481
|
+
this.initRenderAll = (options === null || options === void 0 ? void 0 : options.initRenderAll) || false;
|
|
33482
|
+
this._skipRenderAttributes.push('frozenTopRow');
|
|
33483
|
+
this._skipRenderAttributes.push('frozenLeftCol');
|
|
33484
|
+
this._skipRenderAttributes.push('frozenRightCol');
|
|
33485
|
+
this._skipRenderAttributes.push('frozenBottomRow');
|
|
33486
|
+
this._skipRenderAttributes.push('rowCount');
|
|
33487
|
+
this._skipRenderAttributes.push('colCount');
|
|
33488
|
+
this._skipRenderAttributes.push('hover');
|
|
33489
|
+
this._skipRenderAttributes.push('select');
|
|
33490
|
+
if (this.attribute.rowSeriesNumberCellStyle.text.padding) {
|
|
33491
|
+
const padding = parsePadding(this.attribute.rowSeriesNumberCellStyle.text.padding);
|
|
33492
|
+
if (typeof padding === 'number') {
|
|
33493
|
+
this._parsedRowSeriesNumberCellPadding = [padding, padding, padding, padding];
|
|
33494
|
+
}
|
|
33495
|
+
else {
|
|
33496
|
+
this._parsedRowSeriesNumberCellPadding = padding;
|
|
33497
|
+
}
|
|
33498
|
+
}
|
|
33499
|
+
if (this.attribute.colSeriesNumberCellStyle.text.padding) {
|
|
33500
|
+
const padding = parsePadding(this.attribute.colSeriesNumberCellStyle.text.padding);
|
|
33501
|
+
if (typeof padding === 'number') {
|
|
33502
|
+
this._parsedColSeriesNumberCellPadding = [padding, padding, padding, padding];
|
|
33503
|
+
}
|
|
33504
|
+
else {
|
|
33505
|
+
this._parsedColSeriesNumberCellPadding = padding;
|
|
33506
|
+
}
|
|
33507
|
+
}
|
|
33508
|
+
this._eventManager = new TableSeriesNumberEventManager(this);
|
|
33509
|
+
}
|
|
33510
|
+
get rowSeriesNumberWidth() {
|
|
33511
|
+
const { rowSeriesNumberWidth } = this.attribute;
|
|
33512
|
+
if (this._maxTextWidth) {
|
|
33513
|
+
return Math.max(this._maxTextWidth + this._parsedRowSeriesNumberCellPadding[3] + this._parsedRowSeriesNumberCellPadding[1], typeof rowSeriesNumberWidth === 'number' ? rowSeriesNumberWidth : 40);
|
|
33514
|
+
}
|
|
33515
|
+
return typeof rowSeriesNumberWidth === 'number' ? rowSeriesNumberWidth : 40;
|
|
33516
|
+
}
|
|
33517
|
+
get colSeriesNumberHeight() {
|
|
33518
|
+
const { colSeriesNumberHeight } = this.attribute;
|
|
33519
|
+
return typeof colSeriesNumberHeight === 'number' ? colSeriesNumberHeight : 20;
|
|
33520
|
+
}
|
|
33521
|
+
get rowCount() {
|
|
33522
|
+
const { rowCount } = this.attribute;
|
|
33523
|
+
return rowCount;
|
|
33524
|
+
}
|
|
33525
|
+
get colCount() {
|
|
33526
|
+
const { colCount } = this.attribute;
|
|
33527
|
+
return colCount;
|
|
33528
|
+
}
|
|
33529
|
+
bindEvents() {
|
|
33530
|
+
this._eventManager.bindEvents();
|
|
33531
|
+
}
|
|
33532
|
+
dispatchTableSeriesNumberEvent(event, ...args) {
|
|
33533
|
+
this._dispatchEvent(event, ...args);
|
|
33534
|
+
}
|
|
33535
|
+
render() {
|
|
33536
|
+
const { rowCount, colCount, rowSeriesNumberWidth, colSeriesNumberHeight, rowSeriesNumberCellStyle, colSeriesNumberCellStyle, rowHeight, colWidth } = this.attribute;
|
|
33537
|
+
const innerView = this.createOrUpdateChild('tableSeriesNumberContainer', {
|
|
33538
|
+
x: 0,
|
|
33539
|
+
y: 0,
|
|
33540
|
+
fill: 'rgba(1,1,1,0)',
|
|
33541
|
+
width: this.rowSeriesNumberWidth + colCount * (typeof colWidth === 'number' ? colWidth : 20),
|
|
33542
|
+
height: this.colSeriesNumberHeight + rowCount * (typeof rowHeight === 'number' ? rowHeight : 20),
|
|
33543
|
+
pickable: false,
|
|
33544
|
+
childrenPickable: true
|
|
33545
|
+
}, 'group');
|
|
33546
|
+
this._tableSeriesNumberContainer = innerView;
|
|
33547
|
+
this._renderContent();
|
|
33548
|
+
}
|
|
33549
|
+
_renderContent() {
|
|
33550
|
+
this._renderRowSeriesNumber();
|
|
33551
|
+
this._renderColSeriesNumber();
|
|
33552
|
+
this._renderFrozenTopRowSeriesNumber();
|
|
33553
|
+
this._renderFrozenLeftColSeriesNumber();
|
|
33554
|
+
this._renderCorner();
|
|
33555
|
+
if (this.initRenderAll) {
|
|
33556
|
+
this.recreateCellsToRowSeriesNumberGroup(0, this.attribute.rowCount - 1);
|
|
33557
|
+
this.recreateCellsToColSeriesNumberGroup(0, this.attribute.colCount - 1);
|
|
33558
|
+
let y = 0;
|
|
33559
|
+
for (let i = 0; i < this.attribute.rowCount; i++) {
|
|
33560
|
+
this.setRowSeriesNumberCellAttributes(i, {
|
|
33561
|
+
y,
|
|
33562
|
+
height: typeof this.attribute.rowHeight === 'number' ? this.attribute.rowHeight : 20
|
|
33563
|
+
});
|
|
33564
|
+
y += typeof this.attribute.rowHeight === 'number' ? this.attribute.rowHeight : 20;
|
|
33565
|
+
}
|
|
33566
|
+
let x = 0;
|
|
33567
|
+
for (let i = 0; i < this.attribute.colCount; i++) {
|
|
33568
|
+
this.setColSeriesNumberCellAttributes(i, {
|
|
33569
|
+
x,
|
|
33570
|
+
width: typeof this.attribute.colWidth === 'number' ? this.attribute.colWidth : 20
|
|
33571
|
+
});
|
|
33572
|
+
x += typeof this.attribute.colWidth === 'number' ? this.attribute.colWidth : 20;
|
|
33573
|
+
}
|
|
33574
|
+
}
|
|
33575
|
+
}
|
|
33576
|
+
_renderCorner() {
|
|
33577
|
+
const { rowCount, colCount, cornerCellStyle: cornerSeriesNumberCellStyle, rowSeriesNumberWidth, colSeriesNumberHeight, rowSeriesNumberCellStyle, colSeriesNumberCellStyle, rowHeight, colWidth } = this.attribute;
|
|
33578
|
+
const cornerGroup = this._tableSeriesNumberContainer.createOrUpdateChild('cornerSeriesNumberCell', {
|
|
33579
|
+
x: 0,
|
|
33580
|
+
y: 0,
|
|
33581
|
+
fill: cornerSeriesNumberCellStyle.bgColor,
|
|
33582
|
+
stroke: cornerSeriesNumberCellStyle.borderLine.stroke,
|
|
33583
|
+
lineWidth: cornerSeriesNumberCellStyle.borderLine.lineWidth,
|
|
33584
|
+
pickable: true,
|
|
33585
|
+
width: this.rowSeriesNumberWidth,
|
|
33586
|
+
height: this.colSeriesNumberHeight
|
|
33587
|
+
}, 'group');
|
|
33588
|
+
cornerGroup.id = '0,0';
|
|
33589
|
+
cornerGroup.states = cornerSeriesNumberCellStyle.states;
|
|
33590
|
+
this._cornerGroup = cornerGroup;
|
|
33591
|
+
}
|
|
33592
|
+
_renderRowSeriesNumber() {
|
|
33593
|
+
const { frozenRowCount, rowCount, colCount, rowSeriesNumberWidth, colSeriesNumberHeight, rowSeriesNumberCellStyle, colSeriesNumberCellStyle, rowHeight, colWidth } = this.attribute;
|
|
33594
|
+
const rowSeriesNumberGroup = this._tableSeriesNumberContainer.createOrUpdateChild('rowSeriesNumberCellGroup', {
|
|
33595
|
+
x: 0,
|
|
33596
|
+
y: this.colSeriesNumberHeight,
|
|
33597
|
+
pickable: true,
|
|
33598
|
+
fill: rowSeriesNumberCellStyle.bgColor,
|
|
33599
|
+
width: this.rowSeriesNumberWidth,
|
|
33600
|
+
height: rowCount * (typeof rowHeight === 'number' ? rowHeight : 20)
|
|
33601
|
+
}, 'group');
|
|
33602
|
+
this._rowSeriesNumberGroup = rowSeriesNumberGroup;
|
|
33603
|
+
}
|
|
33604
|
+
_renderColSeriesNumber() {
|
|
33605
|
+
const { frozenColCount, rowCount, colCount, rowSeriesNumberWidth, colSeriesNumberHeight, rowSeriesNumberCellStyle, colSeriesNumberCellStyle, rowHeight, colWidth } = this.attribute;
|
|
33606
|
+
const colSeriesNumberGroup = this._tableSeriesNumberContainer.createOrUpdateChild('colSeriesNumberCellGroup', {
|
|
33607
|
+
x: this.rowSeriesNumberWidth + frozenColCount * (typeof colWidth === 'number' ? colWidth : 20),
|
|
33608
|
+
y: 0,
|
|
33609
|
+
pickable: true,
|
|
33610
|
+
fill: colSeriesNumberCellStyle.bgColor,
|
|
33611
|
+
width: colCount * (typeof colWidth === 'number' ? colWidth : 20),
|
|
33612
|
+
height: this.colSeriesNumberHeight
|
|
33613
|
+
}, 'group');
|
|
33614
|
+
this._colSeriesNumberGroup = colSeriesNumberGroup;
|
|
33615
|
+
}
|
|
33616
|
+
_renderFrozenTopRowSeriesNumber() {
|
|
33617
|
+
const { frozenRowCount, colCount, rowSeriesNumberWidth, colSeriesNumberHeight, rowSeriesNumberCellStyle, colSeriesNumberCellStyle, rowHeight, colWidth } = this.attribute;
|
|
33618
|
+
const frozenTopSeriesNumberGroup = this._tableSeriesNumberContainer.createOrUpdateChild('frozenTopSeriesNumberGroup', {
|
|
33619
|
+
x: 0,
|
|
33620
|
+
y: this.colSeriesNumberHeight,
|
|
33621
|
+
width: this.rowSeriesNumberWidth,
|
|
33622
|
+
height: frozenRowCount * (typeof rowHeight === 'number' ? rowHeight : 20)
|
|
33623
|
+
}, 'group');
|
|
33624
|
+
this._frozenTopRowSeriesNumberGroup = frozenTopSeriesNumberGroup;
|
|
33625
|
+
}
|
|
33626
|
+
_renderFrozenLeftColSeriesNumber() {
|
|
33627
|
+
const { frozenColCount, rowCount, rowSeriesNumberWidth, colSeriesNumberHeight, rowSeriesNumberCellStyle, colSeriesNumberCellStyle, rowHeight, colWidth } = this.attribute;
|
|
33628
|
+
const frozenLeftSeriesNumberGroup = this._tableSeriesNumberContainer.createOrUpdateChild('frozenLeftSeriesNumberGroup', {
|
|
33629
|
+
x: this.rowSeriesNumberWidth,
|
|
33630
|
+
y: 0,
|
|
33631
|
+
height: this.colSeriesNumberHeight,
|
|
33632
|
+
width: frozenColCount * (typeof colWidth === 'number' ? colWidth : 20)
|
|
33633
|
+
}, 'group');
|
|
33634
|
+
this._frozenLeftColSeriesNumberGroup = frozenLeftSeriesNumberGroup;
|
|
33635
|
+
}
|
|
33636
|
+
recreateCellsToRowSeriesNumberGroup(startIndex, endIndex) {
|
|
33637
|
+
var _a, _b;
|
|
33638
|
+
const { frozenRowCount, rowCount, colCount, rowSeriesNumberWidth, colSeriesNumberHeight, rowSeriesNumberCellStyle, colSeriesNumberCellStyle, rowHeight, colWidth } = this.attribute;
|
|
33639
|
+
this._frozenTopRowSeriesNumberGroup.removeAllChild();
|
|
33640
|
+
this._rowSeriesNumberGroup.removeAllChild();
|
|
33641
|
+
let y = 0;
|
|
33642
|
+
const height = (typeof rowHeight === 'number' ? rowHeight : 20) -
|
|
33643
|
+
this._parsedRowSeriesNumberCellPadding[0] -
|
|
33644
|
+
this._parsedRowSeriesNumberCellPadding[2];
|
|
33645
|
+
if (rowSeriesNumberCellStyle.text.textBaseline === 'middle') {
|
|
33646
|
+
y = this._parsedRowSeriesNumberCellPadding[0] + (height - rowSeriesNumberCellStyle.text.fontSize) / 2;
|
|
33647
|
+
}
|
|
33648
|
+
else if (rowSeriesNumberCellStyle.text.textBaseline === 'bottom') {
|
|
33649
|
+
y = this._parsedRowSeriesNumberCellPadding[0] + height - rowSeriesNumberCellStyle.text.fontSize;
|
|
33650
|
+
}
|
|
33651
|
+
else {
|
|
33652
|
+
y = this._parsedRowSeriesNumberCellPadding[0];
|
|
33653
|
+
}
|
|
33654
|
+
let x;
|
|
33655
|
+
const width = this.rowSeriesNumberWidth - this._parsedRowSeriesNumberCellPadding[3] - this._parsedRowSeriesNumberCellPadding[1];
|
|
33656
|
+
const textAlign = this.attribute.rowSeriesNumberCellStyle.text.textAlign;
|
|
33657
|
+
const padding = this._parsedRowSeriesNumberCellPadding;
|
|
33658
|
+
if (textAlign === 'center') {
|
|
33659
|
+
x = padding[3] + +width / 2;
|
|
33660
|
+
}
|
|
33661
|
+
else if (textAlign === 'right') {
|
|
33662
|
+
x = padding[3] + width;
|
|
33663
|
+
}
|
|
33664
|
+
else {
|
|
33665
|
+
x = padding[3];
|
|
33666
|
+
}
|
|
33667
|
+
for (let i = 0; i < frozenRowCount; i++) {
|
|
33668
|
+
const cellGroup = this._frozenTopRowSeriesNumberGroup.createOrUpdateChild(`rowSeriesNumberCell-${i}`, {
|
|
33669
|
+
x: 0,
|
|
33670
|
+
y: 0,
|
|
33671
|
+
pickable: true,
|
|
33672
|
+
fill: rowSeriesNumberCellStyle.bgColor,
|
|
33673
|
+
stroke: rowSeriesNumberCellStyle.borderLine.stroke,
|
|
33674
|
+
lineWidth: rowSeriesNumberCellStyle.borderLine.lineWidth,
|
|
33675
|
+
width: this.rowSeriesNumberWidth,
|
|
33676
|
+
height: typeof rowHeight === 'number' ? rowHeight : 20
|
|
33677
|
+
}, 'group');
|
|
33678
|
+
cellGroup.id = i;
|
|
33679
|
+
cellGroup.states = rowSeriesNumberCellStyle.states;
|
|
33680
|
+
if ((_a = this.interactionState.selectIndexs) === null || _a === void 0 ? void 0 : _a.has(cellGroup.name)) {
|
|
33681
|
+
cellGroup.useStates([SeriesNumberCellStateValue.select]);
|
|
33682
|
+
}
|
|
33683
|
+
cellGroup.createOrUpdateChild(`rowSeriesNumberCellText-${i}`, Object.assign(Object.assign({ x,
|
|
33684
|
+
y, text: `${i + 1}`, pickable: false, dx: 0 }, rowSeriesNumberCellStyle.text), { textBaseline: 'top' }), 'text');
|
|
33685
|
+
}
|
|
33686
|
+
this._firstRowSeriesNumberIndex = Math.max(startIndex, frozenRowCount) - frozenRowCount;
|
|
33687
|
+
let thisTextMaxWidth = 0;
|
|
33688
|
+
for (let i = this._firstRowSeriesNumberIndex; i <= endIndex - frozenRowCount; i++) {
|
|
33689
|
+
const cellGroup = this._rowSeriesNumberGroup.createOrUpdateChild(`rowSeriesNumberCell-${i + frozenRowCount}`, {
|
|
33690
|
+
x: 0,
|
|
33691
|
+
y: 0,
|
|
33692
|
+
pickable: true,
|
|
33693
|
+
fill: rowSeriesNumberCellStyle.bgColor,
|
|
33694
|
+
stroke: rowSeriesNumberCellStyle.borderLine.stroke,
|
|
33695
|
+
lineWidth: rowSeriesNumberCellStyle.borderLine.lineWidth,
|
|
33696
|
+
width: this.rowSeriesNumberWidth,
|
|
33697
|
+
height: typeof rowHeight === 'number' ? rowHeight : 20
|
|
33698
|
+
}, 'group');
|
|
33699
|
+
cellGroup.id = i + frozenRowCount;
|
|
33700
|
+
cellGroup.states = rowSeriesNumberCellStyle.states;
|
|
33701
|
+
if ((_b = this.interactionState.selectIndexs) === null || _b === void 0 ? void 0 : _b.has(cellGroup.name)) {
|
|
33702
|
+
cellGroup.useStates([SeriesNumberCellStateValue.select]);
|
|
33703
|
+
}
|
|
33704
|
+
const text = cellGroup.createOrUpdateChild(`rowSeriesNumberCellText-${i + frozenRowCount}`, Object.assign(Object.assign({ x,
|
|
33705
|
+
y, text: `${i + 1 + frozenRowCount}`, pickable: false, dx: 0 }, rowSeriesNumberCellStyle.text), { textBaseline: 'top' }), 'text');
|
|
33706
|
+
if (i === endIndex - frozenRowCount) {
|
|
33707
|
+
thisTextMaxWidth = text.clipedWidth;
|
|
33708
|
+
}
|
|
33709
|
+
}
|
|
33710
|
+
clearTimeout(this._changeRowSeriesNumberWidthTimer);
|
|
33711
|
+
this._changeRowSeriesNumberWidthTimer = setTimeout(() => {
|
|
33712
|
+
if (Math.abs(thisTextMaxWidth - this._maxTextWidth) >= 6) {
|
|
33713
|
+
const oldWidth = this._maxTextWidth;
|
|
33714
|
+
this._maxTextWidth = thisTextMaxWidth;
|
|
33715
|
+
this.changeRowSeriesNumberWidth(Math.max(this.rowSeriesNumberWidth, 20));
|
|
33716
|
+
this._dispatchEvent(SeriesNumberEvent.rowSeriesNumberWidthChange, {
|
|
33717
|
+
newWidth: this.rowSeriesNumberWidth,
|
|
33718
|
+
oldWidth
|
|
33719
|
+
});
|
|
33720
|
+
}
|
|
33721
|
+
}, 100);
|
|
33722
|
+
}
|
|
33723
|
+
recreateCellsToColSeriesNumberGroup(startIndex, endIndex) {
|
|
33724
|
+
var _a, _b, _c, _d;
|
|
33725
|
+
const { colCount, colSeriesNumberCellStyle, frozenColCount, colWidth } = this
|
|
33726
|
+
.attribute;
|
|
33727
|
+
const oldFrozenLeftColSeriesNumberGroupCellsWidth = new Map();
|
|
33728
|
+
(_b = (_a = this._frozenLeftColSeriesNumberGroup) === null || _a === void 0 ? void 0 : _a.forEachChildren) === null || _b === void 0 ? void 0 : _b.call(_a, (child, index) => {
|
|
33729
|
+
oldFrozenLeftColSeriesNumberGroupCellsWidth.set(index, child.getAttributes().width);
|
|
33730
|
+
});
|
|
33731
|
+
this._frozenLeftColSeriesNumberGroup.removeAllChild();
|
|
33732
|
+
this._colSeriesNumberGroup.removeAllChild();
|
|
33733
|
+
let y = 0;
|
|
33734
|
+
const height = this.colSeriesNumberHeight -
|
|
33735
|
+
this._parsedColSeriesNumberCellPadding[0] -
|
|
33736
|
+
this._parsedColSeriesNumberCellPadding[2];
|
|
33737
|
+
if (colSeriesNumberCellStyle.text.textBaseline === 'middle') {
|
|
33738
|
+
y = this._parsedColSeriesNumberCellPadding[0] + (height - colSeriesNumberCellStyle.text.fontSize) / 2;
|
|
33739
|
+
}
|
|
33740
|
+
else if (colSeriesNumberCellStyle.text.textBaseline === 'bottom') {
|
|
33741
|
+
y = this._parsedColSeriesNumberCellPadding[0] + height - colSeriesNumberCellStyle.text.fontSize;
|
|
33742
|
+
}
|
|
33743
|
+
else {
|
|
33744
|
+
y = this._parsedColSeriesNumberCellPadding[0];
|
|
33745
|
+
}
|
|
33746
|
+
let x;
|
|
33747
|
+
const width = (typeof colWidth === 'number' ? colWidth : 20) -
|
|
33748
|
+
this._parsedColSeriesNumberCellPadding[3] -
|
|
33749
|
+
this._parsedColSeriesNumberCellPadding[1];
|
|
33750
|
+
const textAlign = this.attribute.colSeriesNumberCellStyle.text.textAlign;
|
|
33751
|
+
const padding = this._parsedColSeriesNumberCellPadding;
|
|
33752
|
+
if (textAlign === 'center') {
|
|
33753
|
+
x = padding[3] + +width / 2;
|
|
33754
|
+
}
|
|
33755
|
+
else if (textAlign === 'right') {
|
|
33756
|
+
x = padding[3] + width;
|
|
33757
|
+
}
|
|
33758
|
+
else {
|
|
33759
|
+
x = padding[3];
|
|
33760
|
+
}
|
|
33761
|
+
for (let i = 0; i < frozenColCount; i++) {
|
|
33762
|
+
const cellGroup = this._frozenLeftColSeriesNumberGroup.createOrUpdateChild(`colSeriesNumberCell-${i}`, {
|
|
33763
|
+
x: 0,
|
|
33764
|
+
y: 0,
|
|
33765
|
+
pickable: true,
|
|
33766
|
+
fill: colSeriesNumberCellStyle.bgColor,
|
|
33767
|
+
stroke: colSeriesNumberCellStyle.borderLine.stroke,
|
|
33768
|
+
lineWidth: colSeriesNumberCellStyle.borderLine.lineWidth,
|
|
33769
|
+
width: oldFrozenLeftColSeriesNumberGroupCellsWidth.get(i) || (typeof colWidth === 'number' ? colWidth : 20),
|
|
33770
|
+
height: this.colSeriesNumberHeight
|
|
33771
|
+
}, 'group');
|
|
33772
|
+
cellGroup.id = i;
|
|
33773
|
+
cellGroup.states = colSeriesNumberCellStyle.states;
|
|
33774
|
+
if ((_c = this.interactionState.selectIndexs) === null || _c === void 0 ? void 0 : _c.has(cellGroup.name)) {
|
|
33775
|
+
cellGroup.useStates([SeriesNumberCellStateValue.select]);
|
|
33776
|
+
}
|
|
33777
|
+
cellGroup.createOrUpdateChild(`colSeriesNumberCellText-${i}`, Object.assign(Object.assign({ x,
|
|
33778
|
+
y, dx: 0, text: generateColField(i), pickable: false }, colSeriesNumberCellStyle.text), { textBaseline: 'top' }), 'text');
|
|
33779
|
+
}
|
|
33780
|
+
this._firstColSeriesNumberIndex = Math.max(startIndex, frozenColCount) - frozenColCount;
|
|
33781
|
+
for (let i = this._firstColSeriesNumberIndex; i <= endIndex - frozenColCount; i++) {
|
|
33782
|
+
const cellGroup = this._colSeriesNumberGroup.createOrUpdateChild(`colSeriesNumberCell-${i + frozenColCount}`, {
|
|
33783
|
+
x: 0,
|
|
33784
|
+
y: 0,
|
|
33785
|
+
pickable: true,
|
|
33786
|
+
fill: colSeriesNumberCellStyle.bgColor,
|
|
33787
|
+
stroke: colSeriesNumberCellStyle.borderLine.stroke,
|
|
33788
|
+
lineWidth: colSeriesNumberCellStyle.borderLine.lineWidth,
|
|
33789
|
+
width: typeof colWidth === 'number' ? colWidth : 20,
|
|
33790
|
+
height: this.colSeriesNumberHeight
|
|
33791
|
+
}, 'group');
|
|
33792
|
+
cellGroup.id = i + frozenColCount;
|
|
33793
|
+
cellGroup.states = colSeriesNumberCellStyle.states;
|
|
33794
|
+
if ((_d = this.interactionState.selectIndexs) === null || _d === void 0 ? void 0 : _d.has(cellGroup.name)) {
|
|
33795
|
+
cellGroup.useStates([SeriesNumberCellStateValue.select]);
|
|
33796
|
+
}
|
|
33797
|
+
cellGroup.createOrUpdateChild(`colSeriesNumberCellText-${i + frozenColCount}`, Object.assign(Object.assign({ x,
|
|
33798
|
+
y, dx: 0, text: generateColField(i + frozenColCount), pickable: false }, colSeriesNumberCellStyle.text), { textBaseline: 'top' }), 'text');
|
|
33799
|
+
}
|
|
33800
|
+
}
|
|
33801
|
+
changeRowSeriesNumberWidth(newWidth) {
|
|
33802
|
+
const { rowHeight, rowCount: oldRowCount, frozenRowCount, frozenColCount: frozenLeftCol, rowSeriesNumberCellStyle } = this.attribute;
|
|
33803
|
+
this._cornerGroup.setAttributes({
|
|
33804
|
+
width: newWidth
|
|
33805
|
+
});
|
|
33806
|
+
this._frozenTopRowSeriesNumberGroup.setAttributes({
|
|
33807
|
+
width: newWidth
|
|
33808
|
+
});
|
|
33809
|
+
for (let i = 0; i < this._frozenTopRowSeriesNumberGroup.children.length; i++) {
|
|
33810
|
+
this.setRowSeriesNumberCellAttributes(i, {
|
|
33811
|
+
width: newWidth
|
|
33812
|
+
});
|
|
33813
|
+
}
|
|
33814
|
+
this._rowSeriesNumberGroup.setAttributes({
|
|
33815
|
+
width: newWidth
|
|
33816
|
+
});
|
|
33817
|
+
for (let i = 0; i < this._rowSeriesNumberGroup.children.length; i++) {
|
|
33818
|
+
this.setRowSeriesNumberCellAttributes(i + this._firstRowSeriesNumberIndex + frozenRowCount, {
|
|
33819
|
+
width: newWidth
|
|
33820
|
+
});
|
|
33821
|
+
}
|
|
33822
|
+
this._frozenLeftColSeriesNumberGroup.setAttributes({
|
|
33823
|
+
x: newWidth
|
|
33824
|
+
});
|
|
33825
|
+
this._colSeriesNumberGroup.setAttributes({
|
|
33826
|
+
x: newWidth + this._frozenLeftColSeriesNumberGroup.getAttributes().width
|
|
33827
|
+
});
|
|
33828
|
+
}
|
|
33829
|
+
getRowSeriesNumberCellGroup(index) {
|
|
33830
|
+
const { frozenRowCount } = this.getAttributes();
|
|
33831
|
+
if (index >= 0 && index < frozenRowCount) {
|
|
33832
|
+
return this._frozenTopRowSeriesNumberGroup.children[index];
|
|
33833
|
+
}
|
|
33834
|
+
const rowSeriesNumberGroup = this._rowSeriesNumberGroup;
|
|
33835
|
+
const rowSeriesNumberCell = rowSeriesNumberGroup.children[index - frozenRowCount - this._firstRowSeriesNumberIndex];
|
|
33836
|
+
return rowSeriesNumberCell;
|
|
33837
|
+
}
|
|
33838
|
+
getColSeriesNumberCellGroup(index) {
|
|
33839
|
+
const { frozenColCount } = this.getAttributes();
|
|
33840
|
+
if (index >= 0 && index < frozenColCount) {
|
|
33841
|
+
return this._frozenLeftColSeriesNumberGroup.children[index];
|
|
33842
|
+
}
|
|
33843
|
+
const colSeriesNumberGroup = this._colSeriesNumberGroup;
|
|
33844
|
+
const colSeriesNumberCell = colSeriesNumberGroup.children[index - frozenColCount - this._firstColSeriesNumberIndex];
|
|
33845
|
+
return colSeriesNumberCell;
|
|
33846
|
+
}
|
|
33847
|
+
getRowSeriesNumberCellAttributes(index) {
|
|
33848
|
+
const { frozenRowCount } = this.getAttributes();
|
|
33849
|
+
if (index >= 0 && index < frozenRowCount) {
|
|
33850
|
+
return this._frozenTopRowSeriesNumberGroup.children[index].attribute;
|
|
33851
|
+
}
|
|
33852
|
+
const rowSeriesNumberGroup = this._rowSeriesNumberGroup;
|
|
33853
|
+
const rowSeriesNumberCell = rowSeriesNumberGroup.children[index - frozenRowCount - this._firstRowSeriesNumberIndex];
|
|
33854
|
+
return rowSeriesNumberCell.attribute;
|
|
33855
|
+
}
|
|
33856
|
+
getColSeriesNumberCellAttributes(index) {
|
|
33857
|
+
const { frozenColCount } = this.getAttributes();
|
|
33858
|
+
if (index >= 0 && index < frozenColCount) {
|
|
33859
|
+
return this._frozenLeftColSeriesNumberGroup.children[index].attribute;
|
|
33860
|
+
}
|
|
33861
|
+
const colSeriesNumberGroup = this._colSeriesNumberGroup;
|
|
33862
|
+
const colSeriesNumberCell = colSeriesNumberGroup.children[index - frozenColCount - this._firstColSeriesNumberIndex];
|
|
33863
|
+
return colSeriesNumberCell.attribute;
|
|
33864
|
+
}
|
|
33865
|
+
setRowSeriesNumberCellAttributes(index, attributes) {
|
|
33866
|
+
const { frozenRowCount } = this.getAttributes();
|
|
33867
|
+
let targetCellGroup;
|
|
33868
|
+
if (index >= 0 && index < frozenRowCount) {
|
|
33869
|
+
const { height: oldHeight, width: oldWidth, y } = this._frozenTopRowSeriesNumberGroup.getAttributes();
|
|
33870
|
+
targetCellGroup = this._frozenTopRowSeriesNumberGroup.children[index];
|
|
33871
|
+
targetCellGroup.setAttributes(attributes);
|
|
33872
|
+
if (attributes.height) {
|
|
33873
|
+
this._frozenTopRowSeriesNumberGroup.setAttributes({
|
|
33874
|
+
height: this._frozenTopRowSeriesNumberGroup.getAttributes().height + (attributes.height - oldHeight)
|
|
33875
|
+
});
|
|
33876
|
+
}
|
|
33877
|
+
if (attributes.width) {
|
|
33878
|
+
this._frozenTopRowSeriesNumberGroup.setAttributes({
|
|
33879
|
+
width: this._frozenTopRowSeriesNumberGroup.getAttributes().width + (attributes.width - oldWidth)
|
|
33880
|
+
});
|
|
33881
|
+
}
|
|
33882
|
+
if (attributes.height) {
|
|
33883
|
+
this._rowSeriesNumberGroup.setAttributes({
|
|
33884
|
+
y: this._frozenTopRowSeriesNumberGroup.getAttributes().height +
|
|
33885
|
+
this._frozenTopRowSeriesNumberGroup.getAttributes().y
|
|
33886
|
+
});
|
|
33887
|
+
}
|
|
33888
|
+
}
|
|
33889
|
+
else {
|
|
33890
|
+
const rowSeriesNumberGroup = this._rowSeriesNumberGroup;
|
|
33891
|
+
targetCellGroup = rowSeriesNumberGroup.children[index - frozenRowCount - this._firstRowSeriesNumberIndex];
|
|
33892
|
+
targetCellGroup.setAttributes(attributes);
|
|
33893
|
+
}
|
|
33894
|
+
if (attributes.width) {
|
|
33895
|
+
let x;
|
|
33896
|
+
const width = attributes.width - this._parsedRowSeriesNumberCellPadding[3] - this._parsedRowSeriesNumberCellPadding[1];
|
|
33897
|
+
const textAlign = this.attribute.rowSeriesNumberCellStyle.text.textAlign;
|
|
33898
|
+
const padding = this._parsedRowSeriesNumberCellPadding;
|
|
33899
|
+
if (textAlign === 'center') {
|
|
33900
|
+
x = padding[3] + +width / 2;
|
|
33901
|
+
}
|
|
33902
|
+
else if (textAlign === 'right') {
|
|
33903
|
+
x = padding[3] + width;
|
|
33904
|
+
}
|
|
33905
|
+
else {
|
|
33906
|
+
x = padding[3];
|
|
33907
|
+
}
|
|
33908
|
+
targetCellGroup.children[0].setAttributes({
|
|
33909
|
+
x
|
|
33910
|
+
});
|
|
33911
|
+
}
|
|
33912
|
+
if (attributes.height) {
|
|
33913
|
+
const height = attributes.height - this._parsedRowSeriesNumberCellPadding[0] - this._parsedRowSeriesNumberCellPadding[2];
|
|
33914
|
+
const textBaseline = this.attribute.rowSeriesNumberCellStyle.text.textBaseline;
|
|
33915
|
+
const padding = this._parsedRowSeriesNumberCellPadding;
|
|
33916
|
+
let y;
|
|
33917
|
+
if (textBaseline === 'middle') {
|
|
33918
|
+
y = padding[0] + (height - this.attribute.rowSeriesNumberCellStyle.text.fontSize) / 2;
|
|
33919
|
+
}
|
|
33920
|
+
else if (textBaseline === 'bottom') {
|
|
33921
|
+
y = padding[0] + height - this.attribute.rowSeriesNumberCellStyle.text.fontSize;
|
|
33922
|
+
}
|
|
33923
|
+
else {
|
|
33924
|
+
y = padding[0];
|
|
33925
|
+
}
|
|
33926
|
+
targetCellGroup.children[0].setAttributes({
|
|
33927
|
+
y
|
|
33928
|
+
});
|
|
33929
|
+
}
|
|
33930
|
+
}
|
|
33931
|
+
setColSeriesNumberCellAttributes(index, attributes) {
|
|
33932
|
+
const { frozenColCount: frozenColCount } = this.getAttributes();
|
|
33933
|
+
let targetCellGroup;
|
|
33934
|
+
if (index >= 0 && index < frozenColCount) {
|
|
33935
|
+
targetCellGroup = this._frozenLeftColSeriesNumberGroup.children[index];
|
|
33936
|
+
const { height: oldHeight, width: oldWidth } = targetCellGroup.getAttributes();
|
|
33937
|
+
targetCellGroup.setAttributes(attributes);
|
|
33938
|
+
if (attributes.height) {
|
|
33939
|
+
this._frozenLeftColSeriesNumberGroup.setAttributes({
|
|
33940
|
+
height: this._frozenLeftColSeriesNumberGroup.getAttributes().height + (attributes.height - oldHeight)
|
|
33941
|
+
});
|
|
33942
|
+
}
|
|
33943
|
+
if (attributes.width) {
|
|
33944
|
+
this._frozenLeftColSeriesNumberGroup.setAttributes({
|
|
33945
|
+
width: this._frozenLeftColSeriesNumberGroup.getAttributes().width + (attributes.width - oldWidth)
|
|
33946
|
+
});
|
|
33947
|
+
}
|
|
33948
|
+
if (attributes.width) {
|
|
33949
|
+
this._colSeriesNumberGroup.setAttributes({
|
|
33950
|
+
x: this._frozenLeftColSeriesNumberGroup.getAttributes().width +
|
|
33951
|
+
this._frozenLeftColSeriesNumberGroup.getAttributes().x
|
|
33952
|
+
});
|
|
33953
|
+
}
|
|
33954
|
+
}
|
|
33955
|
+
else {
|
|
33956
|
+
const colSeriesNumberGroup = this._colSeriesNumberGroup;
|
|
33957
|
+
targetCellGroup = colSeriesNumberGroup.children[index - frozenColCount - this._firstColSeriesNumberIndex];
|
|
33958
|
+
targetCellGroup.setAttributes(attributes);
|
|
33959
|
+
}
|
|
33960
|
+
if (attributes.width) {
|
|
33961
|
+
let x;
|
|
33962
|
+
const width = attributes.width - this._parsedColSeriesNumberCellPadding[3] - this._parsedColSeriesNumberCellPadding[1];
|
|
33963
|
+
const textAlign = this.attribute.colSeriesNumberCellStyle.text.textAlign;
|
|
33964
|
+
const padding = this._parsedColSeriesNumberCellPadding;
|
|
33965
|
+
if (textAlign === 'center') {
|
|
33966
|
+
x = padding[3] + +width / 2;
|
|
33967
|
+
}
|
|
33968
|
+
else if (textAlign === 'right') {
|
|
33969
|
+
x = padding[3] + width;
|
|
33970
|
+
}
|
|
33971
|
+
else {
|
|
33972
|
+
x = padding[3];
|
|
33973
|
+
}
|
|
33974
|
+
targetCellGroup.children[0].setAttributes({
|
|
33975
|
+
x
|
|
33976
|
+
});
|
|
33977
|
+
}
|
|
33978
|
+
if (attributes.height) {
|
|
33979
|
+
const height = attributes.height - this._parsedColSeriesNumberCellPadding[0] - this._parsedColSeriesNumberCellPadding[2];
|
|
33980
|
+
const textBaseline = this.attribute.colSeriesNumberCellStyle.text.textBaseline;
|
|
33981
|
+
const padding = this._parsedColSeriesNumberCellPadding;
|
|
33982
|
+
let y;
|
|
33983
|
+
if (textBaseline === 'middle') {
|
|
33984
|
+
y = padding[0] + (height - this.attribute.colSeriesNumberCellStyle.text.fontSize) / 2;
|
|
33985
|
+
}
|
|
33986
|
+
else if (textBaseline === 'bottom') {
|
|
33987
|
+
y = padding[0] + height - this.attribute.colSeriesNumberCellStyle.text.fontSize;
|
|
33988
|
+
}
|
|
33989
|
+
else {
|
|
33990
|
+
y = padding[0];
|
|
33991
|
+
}
|
|
33992
|
+
targetCellGroup.children[0].setAttributes({
|
|
33993
|
+
y
|
|
33994
|
+
});
|
|
33995
|
+
}
|
|
33996
|
+
}
|
|
33997
|
+
setRowSeriesNumberGroupAttributes(attributes) {
|
|
33998
|
+
this._rowSeriesNumberGroup.setAttributes(attributes);
|
|
33999
|
+
}
|
|
34000
|
+
setColSeriesNumberGroupAttributes(attributes) {
|
|
34001
|
+
this._colSeriesNumberGroup.setAttributes(attributes);
|
|
34002
|
+
}
|
|
34003
|
+
addSelectedIndex(isRow, index) {
|
|
34004
|
+
let name;
|
|
34005
|
+
if (isRow) {
|
|
34006
|
+
name = `rowSeriesNumberCell-${index}`;
|
|
34007
|
+
}
|
|
34008
|
+
else {
|
|
34009
|
+
name = `colSeriesNumberCell-${index}`;
|
|
34010
|
+
}
|
|
34011
|
+
this.interactionState.selectIndexs.add(name);
|
|
34012
|
+
}
|
|
34013
|
+
addRowSelectedRanges(ranges) {
|
|
34014
|
+
performance.now();
|
|
34015
|
+
for (let i = 0; i < ranges.length; i++) {
|
|
34016
|
+
const { startIndex, endIndex } = ranges[i];
|
|
34017
|
+
for (let j = startIndex; j <= endIndex; j++) {
|
|
34018
|
+
const name = `rowSeriesNumberCell-${j}`;
|
|
34019
|
+
this.interactionState.selectIndexs.add(name);
|
|
34020
|
+
}
|
|
34021
|
+
}
|
|
34022
|
+
performance.now();
|
|
34023
|
+
}
|
|
34024
|
+
addColSelectedRanges(ranges) {
|
|
34025
|
+
for (let i = 0; i < ranges.length; i++) {
|
|
34026
|
+
const { startIndex, endIndex } = ranges[i];
|
|
34027
|
+
for (let j = startIndex; j <= endIndex; j++) {
|
|
34028
|
+
const name = `colSeriesNumberCell-${j}`;
|
|
34029
|
+
this.interactionState.selectIndexs.add(name);
|
|
34030
|
+
}
|
|
34031
|
+
}
|
|
34032
|
+
}
|
|
34033
|
+
addCornderSelected() {
|
|
34034
|
+
this.interactionState.selectIndexs.add(this._cornerGroup.name);
|
|
34035
|
+
}
|
|
34036
|
+
resetAllSelectedIndexs({ rowIndexs, colIndexs }) {
|
|
34037
|
+
this.interactionState.selectIndexs = new Set();
|
|
34038
|
+
if (rowIndexs) {
|
|
34039
|
+
for (let i = 0; i < rowIndexs.length; i++) {
|
|
34040
|
+
const name = `rowSeriesNumberCell-${rowIndexs[i]}`;
|
|
34041
|
+
this.interactionState.selectIndexs.add(name);
|
|
34042
|
+
}
|
|
34043
|
+
}
|
|
34044
|
+
if (colIndexs) {
|
|
34045
|
+
for (let i = 0; i < colIndexs.length; i++) {
|
|
34046
|
+
const name = `colSeriesNumberCell-${colIndexs[i]}`;
|
|
34047
|
+
this.interactionState.selectIndexs.add(name);
|
|
34048
|
+
}
|
|
34049
|
+
}
|
|
34050
|
+
}
|
|
34051
|
+
removeSelectedIndex(isRow, index) {
|
|
34052
|
+
let name;
|
|
34053
|
+
if (isRow) {
|
|
34054
|
+
name = `rowSeriesNumberLeftCell-${index}`;
|
|
34055
|
+
}
|
|
34056
|
+
else {
|
|
34057
|
+
name = `colSeriesNumberCell-${index}`;
|
|
34058
|
+
}
|
|
34059
|
+
this.interactionState.selectIndexs.delete(name);
|
|
34060
|
+
}
|
|
34061
|
+
removeAllSelectedIndexs() {
|
|
34062
|
+
var _a, _b;
|
|
34063
|
+
for (const name of this.interactionState.selectIndexs) {
|
|
34064
|
+
const isRow = name.startsWith('row');
|
|
34065
|
+
const isCol = name.startsWith('col');
|
|
34066
|
+
const index = Number(name.split('-')[1]);
|
|
34067
|
+
if (isRow) {
|
|
34068
|
+
(_a = this.getRowSeriesNumberCellGroup(index)) === null || _a === void 0 ? void 0 : _a.removeState(SeriesNumberCellStateValue.select);
|
|
34069
|
+
}
|
|
34070
|
+
else if (isCol) {
|
|
34071
|
+
(_b = this.getColSeriesNumberCellGroup(index)) === null || _b === void 0 ? void 0 : _b.removeState(SeriesNumberCellStateValue.select);
|
|
34072
|
+
}
|
|
34073
|
+
else {
|
|
34074
|
+
this._cornerGroup.removeState(SeriesNumberCellStateValue.select);
|
|
34075
|
+
}
|
|
34076
|
+
}
|
|
34077
|
+
this.interactionState.selectIndexs.clear();
|
|
34078
|
+
}
|
|
34079
|
+
removeOneGroupSelected(group) {
|
|
34080
|
+
this.interactionState.selectIndexs.delete(group.name);
|
|
34081
|
+
group.removeState(SeriesNumberCellStateValue.select);
|
|
34082
|
+
}
|
|
34083
|
+
addOneGroupSelected(group) {
|
|
34084
|
+
this.interactionState.selectIndexs.add(group.name);
|
|
34085
|
+
group.useStates([SeriesNumberCellStateValue.select]);
|
|
34086
|
+
}
|
|
34087
|
+
renderSelectedIndexsState() {
|
|
34088
|
+
var _a, _b;
|
|
34089
|
+
this.attribute;
|
|
34090
|
+
for (const name of this.interactionState.selectIndexs) {
|
|
34091
|
+
const isRow = name.startsWith('row');
|
|
34092
|
+
const isCol = name.startsWith('col');
|
|
34093
|
+
const index = Number(name.split('-')[1]);
|
|
34094
|
+
if (isRow) {
|
|
34095
|
+
(_a = this.getRowSeriesNumberCellGroup(index)) === null || _a === void 0 ? void 0 : _a.useStates([SeriesNumberCellStateValue.select]);
|
|
34096
|
+
}
|
|
34097
|
+
else if (isCol) {
|
|
34098
|
+
(_b = this.getColSeriesNumberCellGroup(index)) === null || _b === void 0 ? void 0 : _b.useStates([SeriesNumberCellStateValue.select]);
|
|
34099
|
+
}
|
|
34100
|
+
else {
|
|
34101
|
+
this._cornerGroup.useStates([SeriesNumberCellStateValue.select]);
|
|
34102
|
+
}
|
|
34103
|
+
}
|
|
34104
|
+
this.stage.render();
|
|
34105
|
+
}
|
|
34106
|
+
}
|
|
34107
|
+
TableSeriesNumber.defaultAttributes = {
|
|
34108
|
+
frozenRowCount: 0,
|
|
34109
|
+
frozenColCount: 0,
|
|
34110
|
+
rightFrozenColCount: 0,
|
|
34111
|
+
bottomFrozenRowCount: 0,
|
|
34112
|
+
pickable: false,
|
|
34113
|
+
rowCount: 100,
|
|
34114
|
+
colCount: 100,
|
|
34115
|
+
rowHeight: 20,
|
|
34116
|
+
colWidth: 50,
|
|
34117
|
+
rowSeriesNumberWidth: 30,
|
|
34118
|
+
colSeriesNumberHeight: 30,
|
|
34119
|
+
rowSeriesNumberCellStyle: {
|
|
34120
|
+
text: {
|
|
34121
|
+
fontSize: 14,
|
|
34122
|
+
fill: '#7A7A7A',
|
|
34123
|
+
pickable: false,
|
|
34124
|
+
textAlign: 'left',
|
|
34125
|
+
textBaseline: 'middle',
|
|
34126
|
+
padding: [2, 4, 2, 4]
|
|
34127
|
+
},
|
|
34128
|
+
borderLine: {
|
|
34129
|
+
stroke: '#D9D9D9',
|
|
34130
|
+
lineWidth: 1,
|
|
34131
|
+
pickable: false
|
|
34132
|
+
},
|
|
34133
|
+
bgColor: '#F9F9F9',
|
|
34134
|
+
states: {
|
|
34135
|
+
hover: {
|
|
34136
|
+
fill: '#98C8A5',
|
|
34137
|
+
opacity: 0.7
|
|
34138
|
+
},
|
|
34139
|
+
select: {
|
|
34140
|
+
fill: 'yellow',
|
|
34141
|
+
opacity: 0.7
|
|
34142
|
+
}
|
|
34143
|
+
}
|
|
34144
|
+
},
|
|
34145
|
+
colSeriesNumberCellStyle: {
|
|
34146
|
+
text: {
|
|
34147
|
+
fontSize: 14,
|
|
34148
|
+
fill: '#7A7A7A',
|
|
34149
|
+
pickable: false,
|
|
34150
|
+
textAlign: 'left',
|
|
34151
|
+
textBaseline: 'middle',
|
|
34152
|
+
padding: [2, 4, 2, 4]
|
|
34153
|
+
},
|
|
34154
|
+
borderLine: {
|
|
34155
|
+
stroke: '#D9D9D9',
|
|
34156
|
+
lineWidth: 1,
|
|
34157
|
+
pickable: false
|
|
34158
|
+
},
|
|
34159
|
+
bgColor: '#F9F9F9',
|
|
34160
|
+
states: {
|
|
34161
|
+
hover: {
|
|
34162
|
+
fill: '#98C8A5',
|
|
34163
|
+
opacity: 0.7
|
|
34164
|
+
},
|
|
34165
|
+
select: {
|
|
34166
|
+
fill: 'orange',
|
|
34167
|
+
opacity: 0.7
|
|
34168
|
+
}
|
|
34169
|
+
}
|
|
34170
|
+
},
|
|
34171
|
+
cornerCellStyle: {
|
|
34172
|
+
borderLine: {
|
|
34173
|
+
stroke: '#D9D9D9',
|
|
34174
|
+
lineWidth: 1,
|
|
34175
|
+
pickable: false
|
|
34176
|
+
},
|
|
34177
|
+
bgColor: '#F9F9F9',
|
|
34178
|
+
states: {
|
|
34179
|
+
hover: {
|
|
34180
|
+
fill: '#98C8A5',
|
|
34181
|
+
opacity: 0.7
|
|
34182
|
+
},
|
|
34183
|
+
select: {
|
|
34184
|
+
fill: '#98C8A5',
|
|
34185
|
+
opacity: 0.7
|
|
34186
|
+
}
|
|
34187
|
+
}
|
|
34188
|
+
},
|
|
34189
|
+
hover: true,
|
|
34190
|
+
select: true
|
|
34191
|
+
};
|
|
34192
|
+
|
|
34193
|
+
const version = "1.0.15";
|
|
33199
34194
|
|
|
33200
|
-
export { AXIS_ELEMENT_NAME, AbstractComponent, ArcInfo, ArcLabel, ArcSegment, AxisStateValue, BasePlayer, Brush, CheckBox, CircleAxis, CircleAxisGrid, CircleCrosshair, ColorContinuousLegend, ContinuousPlayer, DEFAULT_ITEM_SPACE_COL, DEFAULT_ITEM_SPACE_ROW, DEFAULT_LABEL_SPACE, DEFAULT_PAGER_SPACE, DEFAULT_SHAPE_SIZE, DEFAULT_SHAPE_SPACE, DEFAULT_STATES$1 as DEFAULT_STATES, DEFAULT_TITLE_SPACE, DEFAULT_VALUE_SPACE, DataLabel, DataZoom, DataZoomActiveTag, DirectionEnum, DiscreteLegend, DiscretePlayer, EmptyTip, GroupTransition, IMarkAreaLabelPosition, IMarkCommonArcLabelPosition, IMarkLineLabelPosition, IMarkPointItemPosition, IOperateType, Indicator, LEGEND_ELEMENT_NAME, LabelBase, LegendEvent, LegendStateValue, LineAxis, LineAxisGrid, LineCrosshair, LineLabel, LinkPath, MarkArcArea, MarkArcLine, MarkArea, MarkLine, MarkPoint, Pager, PlayerEventEnum, PolygonCrosshair, PolygonSectorCrosshair, PopTip, Radio, RectCrosshair, RectLabel, SLIDER_ELEMENT_NAME, ScrollBar, SectorCrosshair, Segment, SizeContinuousLegend, Slider, StoryLabelItem, Switch, SymbolLabel, Tag, Timeline, Title, Tooltip, TopZIndex, VTag, WeatherBox, alignTextInLine, angle, angleLabelOrientAttribute, angleTo, cartesianTicks, clampRadian, computeOffsetForlimit, continuousTicks, contrastAccessibilityChecker, convertDomainToTickData, createTextGraphicByType, deltaXYToAngle, fuzzyEqualNumber, getAxisBreakSymbolAttrs, getCircleLabelPosition, getCirclePoints, getCircleVerticalVector, getElMap, getHorizontalPath, getMarksByName, getNoneGroupMarksByName, getPolarAngleLabelPosition, getPolygonPath, getSizeHandlerPath, getTextAlignAttrOfVerticalDir, getTextType, getVerticalCoord, getVerticalPath, hasOverlap, htmlAttributeTransform, initTextMeasure, isInRange, isPostiveXAxis, isRichText, isVisible, labelSmartInvert, length, limitShapeInBounds, linearDiscreteTicks, loadPoptip, loadScrollbar, measureTextSize, normalize, polarAngleAxisDiscreteTicks, polarTicks, reactAttributeTransform, registerArcDataLabel, registerLineDataLabel, registerMarkArcAreaAnimate, registerMarkArcLineAnimate, registerMarkAreaAnimate, registerMarkLineAnimate, registerMarkPointAnimate, registerRectDataLabel, registerSymbolDataLabel, removeRepeatPoint, richTextAttributeTransform, scale, scrollbarModule, setPoptipTheme, smartInvertStrategy, tan2AngleToAngle, textIntersect, ticks, traverseGroup, version };
|
|
34195
|
+
export { AXIS_ELEMENT_NAME, AbstractComponent, ArcInfo, ArcLabel, ArcSegment, AxisStateValue, BasePlayer, Brush, CheckBox, CircleAxis, CircleAxisGrid, CircleCrosshair, ColorContinuousLegend, ContinuousPlayer, DEFAULT_ITEM_SPACE_COL, DEFAULT_ITEM_SPACE_ROW, DEFAULT_LABEL_SPACE, DEFAULT_PAGER_SPACE, DEFAULT_SHAPE_SIZE, DEFAULT_SHAPE_SPACE, DEFAULT_STATES$1 as DEFAULT_STATES, DEFAULT_TITLE_SPACE, DEFAULT_VALUE_SPACE, DataLabel, DataZoom, DataZoomActiveTag, DirectionEnum, DiscreteLegend, DiscretePlayer, EmptyTip, GroupTransition, IMarkAreaLabelPosition, IMarkCommonArcLabelPosition, IMarkLineLabelPosition, IMarkPointItemPosition, IOperateType, Indicator, LEGEND_ELEMENT_NAME, LabelBase, LegendEvent, LegendStateValue, LineAxis, LineAxisGrid, LineCrosshair, LineLabel, LinkPath, MarkArcArea, MarkArcLine, MarkArea, MarkLine, MarkPoint, Pager, PlayerEventEnum, PolygonCrosshair, PolygonSectorCrosshair, PopTip, Radio, RectCrosshair, RectLabel, SLIDER_ELEMENT_NAME, ScrollBar, SectorCrosshair, Segment, SeriesNumberCellStateValue, SeriesNumberEvent, SizeContinuousLegend, Slider, StoryLabelItem, Switch, SymbolLabel, TableSeriesNumber, Tag, Timeline, Title, Tooltip, TopZIndex, VTag, WeatherBox, alignTextInLine, angle, angleLabelOrientAttribute, angleTo, cartesianTicks, clampRadian, computeOffsetForlimit, continuousTicks, contrastAccessibilityChecker, convertDomainToTickData, createTextGraphicByType, deltaXYToAngle, fuzzyEqualNumber, getAxisBreakSymbolAttrs, getCircleLabelPosition, getCirclePoints, getCircleVerticalVector, getElMap, getHorizontalPath, getMarksByName, getNoneGroupMarksByName, getPolarAngleLabelPosition, getPolygonPath, getSizeHandlerPath, getTextAlignAttrOfVerticalDir, getTextType, getVerticalCoord, getVerticalPath, hasOverlap, htmlAttributeTransform, initTextMeasure, isInRange, isPostiveXAxis, isRichText, isVisible, labelSmartInvert, length, limitShapeInBounds, linearDiscreteTicks, loadPoptip, loadScrollbar, measureTextSize, normalize, polarAngleAxisDiscreteTicks, polarTicks, reactAttributeTransform, registerArcDataLabel, registerLineDataLabel, registerMarkArcAreaAnimate, registerMarkArcLineAnimate, registerMarkAreaAnimate, registerMarkLineAnimate, registerMarkPointAnimate, registerRectDataLabel, registerSymbolDataLabel, removeRepeatPoint, richTextAttributeTransform, scale, scrollbarModule, setPoptipTheme, smartInvertStrategy, tan2AngleToAngle, textIntersect, ticks, traverseGroup, version };
|