arthub-table 0.2.4 → 0.2.5-next.1
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/arthub-table.common.js +1 -1
- package/dist/arthub-table.common.js.map +1 -1
- package/dist/arthub-table.umd.js +1 -1
- package/dist/arthub-table.umd.js.map +1 -1
- package/dist/arthub-table.umd.min.js +1 -1
- package/dist/arthub-table.umd.min.js.map +1 -1
- package/dist/types/core/viewers/RelatedTaskViewer.d.ts +24 -14
- package/package.json +1 -1
|
@@ -41,23 +41,33 @@ declare class RelatedTaskViewer implements CellViewer<RelatedTaskViewerData> {
|
|
|
41
41
|
draw(context: ViewerRenderContext, data: RelatedTaskViewerData): void;
|
|
42
42
|
private drawSingleLine;
|
|
43
43
|
/**
|
|
44
|
-
* Single file-type field branch: draws label +
|
|
45
|
-
*
|
|
46
|
-
*
|
|
44
|
+
* Single file-type field branch: draws label + thumbnails.
|
|
45
|
+
* Each thumbnail keeps its own aspect ratio (width = baseH × ratio, no per-image cap) and is laid out
|
|
46
|
+
* left-to-right; trailing thumbnails are dropped (and "..." shown) when remaining space cannot fit the
|
|
47
|
+
* next thumbnail at the minimum drawable width. When the total width still exceeds the available area
|
|
48
|
+
* after dropping, all kept thumbnails are uniformly height-scaled so they stay vertically aligned.
|
|
47
49
|
*/
|
|
48
50
|
private drawSingleFileFieldLine;
|
|
49
51
|
/**
|
|
50
|
-
* Compute
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
52
|
+
* Compute thumbnail layout for "single file-type field" mode (also reused by inline / multi-line
|
|
53
|
+
* thumbnail rendering).
|
|
54
|
+
*
|
|
55
|
+
* Algorithm (Plan B — per-thumbnail independent width, with per-image MAX cap):
|
|
56
|
+
* 1. Each thumbnail's natural width = baseH × aspectRatio, then capped at MAX_THUMBNAIL_WIDTH
|
|
57
|
+
* so a single panorama-style image cannot dominate the row. The row height stays at baseH;
|
|
58
|
+
* capped wide images are rendered into a baseH × MAX box with `contain` fit so they're
|
|
59
|
+
* shown letterboxed instead of distorted.
|
|
60
|
+
* 2. Walk thumbnails left-to-right, accumulating width + THUMBNAIL_GAP. The first thumbnail
|
|
61
|
+
* whose remaining space cannot fit even MIN_THUMBNAIL_WIDTH is dropped together with all
|
|
62
|
+
* subsequent ones; the caller draws a trailing "..." indicator.
|
|
63
|
+
* 3. If the kept thumbnails' total width still exceeds availableWidth (e.g. one extreme image
|
|
64
|
+
* alone can't fit), apply a uniform height-scale so they all shrink proportionally while
|
|
65
|
+
* staying vertically aligned. Re-check MIN_THUMBNAIL_WIDTH after scaling and drop tail
|
|
66
|
+
* one-by-one if any kept item falls below the minimum (n === 1 is always accepted to keep
|
|
67
|
+
* at least one image visible).
|
|
68
|
+
*
|
|
69
|
+
* Compared to the previous algorithm, a single overly-wide thumbnail no longer compresses the
|
|
70
|
+
* entire row, so unrelated narrow thumbnails won't be silently dropped.
|
|
61
71
|
*/
|
|
62
72
|
private computeSingleFileFieldLayout;
|
|
63
73
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arthub-table",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5-next.1",
|
|
4
4
|
"description": "High-performance canvas-based table/grid component for Vue 3 with TypeScript support, featuring virtual scrolling, cell viewers, grouped rows, and nested grids.",
|
|
5
5
|
"main": "dist/arthub-table.common.js",
|
|
6
6
|
"module": "dist/arthub-table.umd.min.js",
|