@visactor/vtable 1.1.2 → 1.1.3-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/cjs/core/BaseTable.js +1 -1
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +2 -2
- package/cjs/index.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +24 -16
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/cjs/scenegraph/layout/compute-col-width.js +1 -1
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
- package/cjs/scenegraph/utils/break-string.js +3 -2
- package/cjs/scenegraph/utils/break-string.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +33 -14
- package/dist/vtable.min.js +2 -2
- package/es/core/BaseTable.js +1 -1
- package/es/core/BaseTable.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/scenegraph/graphic/contributions/group-contribution-render.js +24 -16
- package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/es/scenegraph/layout/compute-col-width.js +1 -1
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/scenegraph/layout/compute-row-height.js.map +1 -1
- package/es/scenegraph/utils/break-string.js +4 -1
- package/es/scenegraph/utils/break-string.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +3 -3
package/dist/vtable.js
CHANGED
|
@@ -37640,6 +37640,10 @@
|
|
|
37640
37640
|
}
|
|
37641
37641
|
|
|
37642
37642
|
function breakString(textStr, table) {
|
|
37643
|
+
if (isString$2(textStr) && textStr.length > (table.options.maxCharactersNumber || 200)) {
|
|
37644
|
+
textStr = textStr.slice(0, table.options.maxCharactersNumber || 200);
|
|
37645
|
+
textStr += '\u2026';
|
|
37646
|
+
}
|
|
37643
37647
|
let text;
|
|
37644
37648
|
if (!table.internalProps.enableLineBreak && !table.options.customConfig?.multilinesForXTable) {
|
|
37645
37649
|
text = [convertInternal(textStr)];
|
|
@@ -43397,7 +43401,8 @@
|
|
|
43397
43401
|
useStyle = true;
|
|
43398
43402
|
order = 0;
|
|
43399
43403
|
drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb) {
|
|
43400
|
-
const {
|
|
43404
|
+
const { stroke = groupAttribute.stroke, strokeArrayColor = groupAttribute.strokeArrayColor, strokeArrayWidth = groupAttribute.strokeArrayWidth, lineWidth = groupAttribute.lineWidth, strokeColor = groupAttribute.stroke } = group.attribute;
|
|
43405
|
+
let { width = groupAttribute.width, height = groupAttribute.height } = group.attribute;
|
|
43401
43406
|
if (!stroke || (!Array.isArray(strokeArrayWidth) && lineWidth === 0)) {
|
|
43402
43407
|
return;
|
|
43403
43408
|
}
|
|
@@ -43431,6 +43436,10 @@
|
|
|
43431
43436
|
x = Math.floor(x) + 0.5;
|
|
43432
43437
|
y = Math.floor(y) + 0.5;
|
|
43433
43438
|
}
|
|
43439
|
+
if (table.options.customConfig?._disableColumnAndRowSizeRound) {
|
|
43440
|
+
width = Math.round(width);
|
|
43441
|
+
height = Math.round(height);
|
|
43442
|
+
}
|
|
43434
43443
|
const { width: widthFroDraw, height: heightFroDraw } = getCellSizeForDraw(group, Math.ceil(width + deltaWidth), Math.ceil(height + deltaHeight));
|
|
43435
43444
|
widthForStroke = widthFroDraw;
|
|
43436
43445
|
heightForStroke = heightFroDraw;
|
|
@@ -43654,18 +43663,24 @@
|
|
|
43654
43663
|
Array.isArray(strokeArrayWidth)) {
|
|
43655
43664
|
return;
|
|
43656
43665
|
}
|
|
43666
|
+
const table = group.stage.table;
|
|
43667
|
+
if (!table) {
|
|
43668
|
+
return;
|
|
43669
|
+
}
|
|
43657
43670
|
const splitLineDash = isArray$1(lineDash[0]) ? getQuadLineDash(lineDash) : [lineDash, lineDash, lineDash, lineDash];
|
|
43658
43671
|
let { width = groupAttribute.width, height = groupAttribute.height } = group.attribute;
|
|
43659
|
-
|
|
43660
|
-
|
|
43672
|
+
if (table.options.customConfig?._disableColumnAndRowSizeRound) {
|
|
43673
|
+
width = Math.round(width);
|
|
43674
|
+
height = Math.round(height);
|
|
43675
|
+
}
|
|
43676
|
+
else {
|
|
43677
|
+
width = Math.ceil(width);
|
|
43678
|
+
height = Math.ceil(height);
|
|
43679
|
+
}
|
|
43661
43680
|
let widthForStroke;
|
|
43662
43681
|
let heightForStroke;
|
|
43663
43682
|
if (lineWidth & 1) {
|
|
43664
|
-
const
|
|
43665
|
-
if (!table) {
|
|
43666
|
-
return;
|
|
43667
|
-
}
|
|
43668
|
-
const bottomRight = table?.theme.cellBorderClipDirection === 'bottom-right';
|
|
43683
|
+
const bottomRight = table.theme.cellBorderClipDirection === 'bottom-right';
|
|
43669
43684
|
let deltaWidth = 0;
|
|
43670
43685
|
let deltaHeight = 0;
|
|
43671
43686
|
if (bottomRight) {
|
|
@@ -43752,7 +43767,7 @@
|
|
|
43752
43767
|
order = 0;
|
|
43753
43768
|
drawShape(group, context, x, y, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb) {
|
|
43754
43769
|
const { lineWidth = groupAttribute.lineWidth, stroke = groupAttribute.stroke, lineDash = groupAttribute.lineDash, strokeArrayWidth = groupAttribute.strokeArrayWidth, strokeArrayColor = groupAttribute.strokeArrayColor, notAdjustPos, cornerRadius = groupAttribute.cornerRadius } = group.attribute;
|
|
43755
|
-
|
|
43770
|
+
let { width = groupAttribute.width, height = groupAttribute.height } = group.attribute;
|
|
43756
43771
|
if (notAdjustPos !== true &&
|
|
43757
43772
|
stroke &&
|
|
43758
43773
|
Array.isArray(lineDash) &&
|
|
@@ -43760,12 +43775,16 @@
|
|
|
43760
43775
|
!Array.isArray(strokeArrayColor) &&
|
|
43761
43776
|
!Array.isArray(strokeArrayWidth) &&
|
|
43762
43777
|
lineWidth & 1) {
|
|
43763
|
-
const { width: widthFroDraw, height: heightFroDraw } = getCellSizeForDraw(group, Math.ceil(width), Math.ceil(height));
|
|
43764
|
-
context.beginPath();
|
|
43765
43778
|
const table = group.stage.table;
|
|
43766
43779
|
if (!table) {
|
|
43767
43780
|
return;
|
|
43768
43781
|
}
|
|
43782
|
+
if (table.options.customConfig?._disableColumnAndRowSizeRound) {
|
|
43783
|
+
width = Math.round(width);
|
|
43784
|
+
height = Math.round(height);
|
|
43785
|
+
}
|
|
43786
|
+
const { width: widthFroDraw, height: heightFroDraw } = getCellSizeForDraw(group, Math.ceil(width), Math.ceil(height));
|
|
43787
|
+
context.beginPath();
|
|
43769
43788
|
const bottomRight = table?.theme.cellBorderClipDirection === 'bottom-right';
|
|
43770
43789
|
let deltaWidth = 0;
|
|
43771
43790
|
let deltaHeight = 0;
|
|
@@ -44605,7 +44624,7 @@
|
|
|
44605
44624
|
const lines = breakString(text, table);
|
|
44606
44625
|
if (lines.length >= 1) {
|
|
44607
44626
|
lines.forEach((line) => {
|
|
44608
|
-
const width = table.measureText(line
|
|
44627
|
+
const width = table.measureText(line, {
|
|
44609
44628
|
fontSize,
|
|
44610
44629
|
fontFamily,
|
|
44611
44630
|
fontWeight
|
|
@@ -58661,7 +58680,7 @@
|
|
|
58661
58680
|
return TABLE_EVENT_TYPE;
|
|
58662
58681
|
}
|
|
58663
58682
|
options;
|
|
58664
|
-
version = "1.1.
|
|
58683
|
+
version = "1.1.3-alpha.0";
|
|
58665
58684
|
pagination;
|
|
58666
58685
|
id = `VTable${Date.now()}`;
|
|
58667
58686
|
headerStyleCache;
|
|
@@ -71623,7 +71642,7 @@
|
|
|
71623
71642
|
}
|
|
71624
71643
|
|
|
71625
71644
|
registerForVrender();
|
|
71626
|
-
const version = "1.1.
|
|
71645
|
+
const version = "1.1.3-alpha.0";
|
|
71627
71646
|
function getIcons() {
|
|
71628
71647
|
return get$2();
|
|
71629
71648
|
}
|