@visactor/vchart 1.13.21-alpha.9 → 1.13.22-alpha.0
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/build/es5/index.js +1 -1
- package/build/index.es.js +24 -8
- package/build/index.js +24 -8
- package/build/index.min.js +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/core/index.d.ts +1 -1
- package/cjs/core/index.js +1 -1
- package/cjs/core/index.js.map +1 -1
- package/cjs/layout/base-layout.d.ts +2 -2
- package/cjs/layout/base-layout.js +14 -7
- package/cjs/layout/base-layout.js.map +1 -1
- package/cjs/layout/interface.d.ts +1 -0
- package/cjs/layout/interface.js.map +1 -1
- package/cjs/plugin/chart/scroll/interface.d.ts +1 -0
- package/cjs/plugin/chart/scroll/interface.js.map +1 -1
- package/cjs/plugin/chart/scroll/scroll.js +1 -1
- package/cjs/plugin/chart/scroll/scroll.js.map +1 -1
- package/esm/core/index.d.ts +1 -1
- package/esm/core/index.js +1 -1
- package/esm/core/index.js.map +1 -1
- package/esm/layout/base-layout.d.ts +2 -2
- package/esm/layout/base-layout.js +14 -7
- package/esm/layout/base-layout.js.map +1 -1
- package/esm/layout/interface.d.ts +1 -0
- package/esm/layout/interface.js.map +1 -1
- package/esm/plugin/chart/scroll/interface.d.ts +1 -0
- package/esm/plugin/chart/scroll/interface.js.map +1 -1
- package/esm/plugin/chart/scroll/scroll.js +1 -1
- package/esm/plugin/chart/scroll/scroll.js.map +1 -1
- package/package.json +3 -3
package/build/index.es.js
CHANGED
|
@@ -61342,7 +61342,9 @@ let Layout$1 = class Layout {
|
|
|
61342
61342
|
};
|
|
61343
61343
|
}
|
|
61344
61344
|
layoutItems(_chart, items, chartLayoutRect, chartViewBox) {
|
|
61345
|
+
var _a, _b, _c;
|
|
61345
61346
|
this._layoutInit(_chart, items, chartLayoutRect, chartViewBox);
|
|
61347
|
+
const secondLayoutLeftRight = (_c = (_b = (_a = _chart === null || _chart === void 0 ? void 0 : _chart.getSpec()) === null || _a === void 0 ? void 0 : _a.layout) === null || _b === void 0 ? void 0 : _b.secondLayoutLeftRight) !== null && _c !== void 0 ? _c : false;
|
|
61346
61348
|
this._layoutNormalItems(items);
|
|
61347
61349
|
const layoutTemp = {
|
|
61348
61350
|
left: this.leftCurrent,
|
|
@@ -61351,8 +61353,8 @@ let Layout$1 = class Layout {
|
|
|
61351
61353
|
bottom: this.bottomCurrent
|
|
61352
61354
|
};
|
|
61353
61355
|
const { regionItems, relativeItems, relativeOverlapItems, allRelatives, overlapItems } = this._groupItems(items);
|
|
61354
|
-
this.layoutRegionItems(regionItems, relativeItems, relativeOverlapItems, overlapItems);
|
|
61355
|
-
this._processAutoIndent(regionItems, relativeItems, relativeOverlapItems, overlapItems, allRelatives, layoutTemp);
|
|
61356
|
+
this.layoutRegionItems(regionItems, relativeItems, relativeOverlapItems, overlapItems, secondLayoutLeftRight);
|
|
61357
|
+
this._processAutoIndent(regionItems, relativeItems, relativeOverlapItems, overlapItems, allRelatives, layoutTemp, secondLayoutLeftRight);
|
|
61356
61358
|
this.layoutAbsoluteItems(items.filter(x => x.layoutType === 'absolute'));
|
|
61357
61359
|
}
|
|
61358
61360
|
_processAutoIndent(regionItems, relativeItems, relativeOverlapItems, overlapItems = {
|
|
@@ -61361,7 +61363,7 @@ let Layout$1 = class Layout {
|
|
|
61361
61363
|
top: { items: [], rect: { width: 0, height: 0 } },
|
|
61362
61364
|
bottom: { items: [], rect: { width: 0, height: 0 } },
|
|
61363
61365
|
z: { items: [], rect: { width: 0, height: 0 } }
|
|
61364
|
-
}, allRelatives, layoutTemp) {
|
|
61366
|
+
}, allRelatives, layoutTemp, secondLayoutLeftRight = false) {
|
|
61365
61367
|
if (allRelatives.some(i => i.autoIndent)) {
|
|
61366
61368
|
const { top, bottom, left, right } = this._checkAutoIndent(allRelatives, layoutTemp);
|
|
61367
61369
|
if (top || bottom || left || right) {
|
|
@@ -61369,7 +61371,7 @@ let Layout$1 = class Layout {
|
|
|
61369
61371
|
this.bottomCurrent = layoutTemp.bottom - bottom;
|
|
61370
61372
|
this.leftCurrent = layoutTemp.left + left;
|
|
61371
61373
|
this.rightCurrent = layoutTemp.right - right;
|
|
61372
|
-
this.layoutRegionItems(regionItems, relativeItems, relativeOverlapItems, overlapItems);
|
|
61374
|
+
this.layoutRegionItems(regionItems, relativeItems, relativeOverlapItems, overlapItems, secondLayoutLeftRight);
|
|
61373
61375
|
}
|
|
61374
61376
|
}
|
|
61375
61377
|
}
|
|
@@ -61522,7 +61524,9 @@ let Layout$1 = class Layout {
|
|
|
61522
61524
|
top: { items: [], rect: { width: 0, height: 0 } },
|
|
61523
61525
|
bottom: { items: [], rect: { width: 0, height: 0 } },
|
|
61524
61526
|
z: { items: [], rect: { width: 0, height: 0 } }
|
|
61525
|
-
}) {
|
|
61527
|
+
}, secondLayoutLeftRight = false) {
|
|
61528
|
+
const leftBeforeLayout = this.leftCurrent;
|
|
61529
|
+
const rightBeforeLayout = this.rightCurrent;
|
|
61526
61530
|
let regionRelativeTotalWidth = this.rightCurrent - this.leftCurrent;
|
|
61527
61531
|
let regionRelativeTotalHeight = this.bottomCurrent - this.topCurrent;
|
|
61528
61532
|
regionRelativeItems
|
|
@@ -61541,6 +61545,16 @@ let Layout$1 = class Layout {
|
|
|
61541
61545
|
this._layoutRelativeOverlap('top', overlapItems.top);
|
|
61542
61546
|
this._layoutRelativeOverlap('bottom', overlapItems.bottom);
|
|
61543
61547
|
regionRelativeTotalHeight = this.bottomCurrent - this.topCurrent;
|
|
61548
|
+
if (secondLayoutLeftRight) {
|
|
61549
|
+
this.leftCurrent = leftBeforeLayout;
|
|
61550
|
+
this.rightCurrent = rightBeforeLayout;
|
|
61551
|
+
regionRelativeItems
|
|
61552
|
+
.filter(x => x.layoutOrient === 'left' || x.layoutOrient === 'right')
|
|
61553
|
+
.forEach(item => {
|
|
61554
|
+
this._layoutRelativeItem(item, this.getItemComputeLayoutRect(item));
|
|
61555
|
+
});
|
|
61556
|
+
regionRelativeTotalWidth = this.rightCurrent - this.leftCurrent;
|
|
61557
|
+
}
|
|
61544
61558
|
const { regionWidth, regionHeight } = this._layoutRegionItem(regionItems, regionRelativeTotalWidth, regionRelativeTotalHeight);
|
|
61545
61559
|
regionRelativeItems.concat(regionRelativeOverlapItems).forEach(item => {
|
|
61546
61560
|
if (['left', 'right'].includes(item.layoutOrient)) {
|
|
@@ -64274,7 +64288,7 @@ const registerVChartCore = () => {
|
|
|
64274
64288
|
};
|
|
64275
64289
|
registerVChartCore();
|
|
64276
64290
|
|
|
64277
|
-
const version = "1.13.
|
|
64291
|
+
const version = "1.13.22-alpha.0";
|
|
64278
64292
|
|
|
64279
64293
|
const addVChartProperty = (data, op) => {
|
|
64280
64294
|
const context = op.beforeCall();
|
|
@@ -104721,8 +104735,10 @@ class ScrollPlugin extends BasePlugin {
|
|
|
104721
104735
|
};
|
|
104722
104736
|
this.onWheel = (e) => {
|
|
104723
104737
|
var _a, _b;
|
|
104724
|
-
|
|
104725
|
-
|
|
104738
|
+
if (this._spec.preventDefault !== false) {
|
|
104739
|
+
e.preventDefault();
|
|
104740
|
+
e.stopPropagation();
|
|
104741
|
+
}
|
|
104726
104742
|
const scrollX = e.deltaX;
|
|
104727
104743
|
const scrollY = e.deltaY;
|
|
104728
104744
|
const rootMark = this.getRootMark();
|
package/build/index.js
CHANGED
|
@@ -61348,7 +61348,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61348
61348
|
};
|
|
61349
61349
|
}
|
|
61350
61350
|
layoutItems(_chart, items, chartLayoutRect, chartViewBox) {
|
|
61351
|
+
var _a, _b, _c;
|
|
61351
61352
|
this._layoutInit(_chart, items, chartLayoutRect, chartViewBox);
|
|
61353
|
+
const secondLayoutLeftRight = (_c = (_b = (_a = _chart === null || _chart === void 0 ? void 0 : _chart.getSpec()) === null || _a === void 0 ? void 0 : _a.layout) === null || _b === void 0 ? void 0 : _b.secondLayoutLeftRight) !== null && _c !== void 0 ? _c : false;
|
|
61352
61354
|
this._layoutNormalItems(items);
|
|
61353
61355
|
const layoutTemp = {
|
|
61354
61356
|
left: this.leftCurrent,
|
|
@@ -61357,8 +61359,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61357
61359
|
bottom: this.bottomCurrent
|
|
61358
61360
|
};
|
|
61359
61361
|
const { regionItems, relativeItems, relativeOverlapItems, allRelatives, overlapItems } = this._groupItems(items);
|
|
61360
|
-
this.layoutRegionItems(regionItems, relativeItems, relativeOverlapItems, overlapItems);
|
|
61361
|
-
this._processAutoIndent(regionItems, relativeItems, relativeOverlapItems, overlapItems, allRelatives, layoutTemp);
|
|
61362
|
+
this.layoutRegionItems(regionItems, relativeItems, relativeOverlapItems, overlapItems, secondLayoutLeftRight);
|
|
61363
|
+
this._processAutoIndent(regionItems, relativeItems, relativeOverlapItems, overlapItems, allRelatives, layoutTemp, secondLayoutLeftRight);
|
|
61362
61364
|
this.layoutAbsoluteItems(items.filter(x => x.layoutType === 'absolute'));
|
|
61363
61365
|
}
|
|
61364
61366
|
_processAutoIndent(regionItems, relativeItems, relativeOverlapItems, overlapItems = {
|
|
@@ -61367,7 +61369,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61367
61369
|
top: { items: [], rect: { width: 0, height: 0 } },
|
|
61368
61370
|
bottom: { items: [], rect: { width: 0, height: 0 } },
|
|
61369
61371
|
z: { items: [], rect: { width: 0, height: 0 } }
|
|
61370
|
-
}, allRelatives, layoutTemp) {
|
|
61372
|
+
}, allRelatives, layoutTemp, secondLayoutLeftRight = false) {
|
|
61371
61373
|
if (allRelatives.some(i => i.autoIndent)) {
|
|
61372
61374
|
const { top, bottom, left, right } = this._checkAutoIndent(allRelatives, layoutTemp);
|
|
61373
61375
|
if (top || bottom || left || right) {
|
|
@@ -61375,7 +61377,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61375
61377
|
this.bottomCurrent = layoutTemp.bottom - bottom;
|
|
61376
61378
|
this.leftCurrent = layoutTemp.left + left;
|
|
61377
61379
|
this.rightCurrent = layoutTemp.right - right;
|
|
61378
|
-
this.layoutRegionItems(regionItems, relativeItems, relativeOverlapItems, overlapItems);
|
|
61380
|
+
this.layoutRegionItems(regionItems, relativeItems, relativeOverlapItems, overlapItems, secondLayoutLeftRight);
|
|
61379
61381
|
}
|
|
61380
61382
|
}
|
|
61381
61383
|
}
|
|
@@ -61528,7 +61530,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61528
61530
|
top: { items: [], rect: { width: 0, height: 0 } },
|
|
61529
61531
|
bottom: { items: [], rect: { width: 0, height: 0 } },
|
|
61530
61532
|
z: { items: [], rect: { width: 0, height: 0 } }
|
|
61531
|
-
}) {
|
|
61533
|
+
}, secondLayoutLeftRight = false) {
|
|
61534
|
+
const leftBeforeLayout = this.leftCurrent;
|
|
61535
|
+
const rightBeforeLayout = this.rightCurrent;
|
|
61532
61536
|
let regionRelativeTotalWidth = this.rightCurrent - this.leftCurrent;
|
|
61533
61537
|
let regionRelativeTotalHeight = this.bottomCurrent - this.topCurrent;
|
|
61534
61538
|
regionRelativeItems
|
|
@@ -61547,6 +61551,16 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61547
61551
|
this._layoutRelativeOverlap('top', overlapItems.top);
|
|
61548
61552
|
this._layoutRelativeOverlap('bottom', overlapItems.bottom);
|
|
61549
61553
|
regionRelativeTotalHeight = this.bottomCurrent - this.topCurrent;
|
|
61554
|
+
if (secondLayoutLeftRight) {
|
|
61555
|
+
this.leftCurrent = leftBeforeLayout;
|
|
61556
|
+
this.rightCurrent = rightBeforeLayout;
|
|
61557
|
+
regionRelativeItems
|
|
61558
|
+
.filter(x => x.layoutOrient === 'left' || x.layoutOrient === 'right')
|
|
61559
|
+
.forEach(item => {
|
|
61560
|
+
this._layoutRelativeItem(item, this.getItemComputeLayoutRect(item));
|
|
61561
|
+
});
|
|
61562
|
+
regionRelativeTotalWidth = this.rightCurrent - this.leftCurrent;
|
|
61563
|
+
}
|
|
61550
61564
|
const { regionWidth, regionHeight } = this._layoutRegionItem(regionItems, regionRelativeTotalWidth, regionRelativeTotalHeight);
|
|
61551
61565
|
regionRelativeItems.concat(regionRelativeOverlapItems).forEach(item => {
|
|
61552
61566
|
if (['left', 'right'].includes(item.layoutOrient)) {
|
|
@@ -64280,7 +64294,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
64280
64294
|
};
|
|
64281
64295
|
registerVChartCore();
|
|
64282
64296
|
|
|
64283
|
-
const version = "1.13.
|
|
64297
|
+
const version = "1.13.22-alpha.0";
|
|
64284
64298
|
|
|
64285
64299
|
const addVChartProperty = (data, op) => {
|
|
64286
64300
|
const context = op.beforeCall();
|
|
@@ -104727,8 +104741,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
104727
104741
|
};
|
|
104728
104742
|
this.onWheel = (e) => {
|
|
104729
104743
|
var _a, _b;
|
|
104730
|
-
|
|
104731
|
-
|
|
104744
|
+
if (this._spec.preventDefault !== false) {
|
|
104745
|
+
e.preventDefault();
|
|
104746
|
+
e.stopPropagation();
|
|
104747
|
+
}
|
|
104732
104748
|
const scrollX = e.deltaX;
|
|
104733
104749
|
const scrollY = e.deltaY;
|
|
104734
104750
|
const rootMark = this.getRootMark();
|