@dataloop-ai/components 0.18.10 → 0.18.12
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/package.json
CHANGED
|
@@ -173,10 +173,12 @@
|
|
|
173
173
|
thumb-size="20px"
|
|
174
174
|
:max="matrix.length"
|
|
175
175
|
:min-range="2"
|
|
176
|
+
:max-range="cellDisplayLimit"
|
|
176
177
|
:selection-color="getCellBackground(0.1)"
|
|
177
178
|
:color="getCellBackground()"
|
|
178
179
|
:step="1"
|
|
179
180
|
drag-range
|
|
181
|
+
:model-value="currentBrushState"
|
|
180
182
|
@update:model-value="handleBrushUpdate"
|
|
181
183
|
/>
|
|
182
184
|
<span class="label-tag x"> {{ bottomLabel }} </span>
|
|
@@ -250,6 +252,10 @@ export default defineComponent({
|
|
|
250
252
|
type: Boolean,
|
|
251
253
|
default: true
|
|
252
254
|
},
|
|
255
|
+
cellDisplayLimit: {
|
|
256
|
+
type: Number,
|
|
257
|
+
default: 10
|
|
258
|
+
},
|
|
253
259
|
color: {
|
|
254
260
|
type: String,
|
|
255
261
|
default: '--dl-color-secondary'
|
|
@@ -277,7 +283,7 @@ export default defineComponent({
|
|
|
277
283
|
const { variables } = useThemeVariables()
|
|
278
284
|
const currentBrushState = ref<{ min: number; max: number }>({
|
|
279
285
|
min: 0,
|
|
280
|
-
max: props.matrix.length
|
|
286
|
+
max: Math.min(props.matrix.length, props.cellDisplayLimit)
|
|
281
287
|
})
|
|
282
288
|
const cellWidth = ref<number | null>(null)
|
|
283
289
|
const rotateXLabels = ref(true)
|
|
@@ -376,7 +382,10 @@ export default defineComponent({
|
|
|
376
382
|
watch: {
|
|
377
383
|
matrix: {
|
|
378
384
|
handler(value) {
|
|
379
|
-
this.currentBrushState.max = Math.min(
|
|
385
|
+
this.currentBrushState.max = Math.min(
|
|
386
|
+
this.cellDisplayLimit,
|
|
387
|
+
value.length
|
|
388
|
+
)
|
|
380
389
|
this.$nextTick(() => {
|
|
381
390
|
this.resizeMatrix()
|
|
382
391
|
})
|
|
@@ -442,7 +451,7 @@ export default defineComponent({
|
|
|
442
451
|
const width = verticalWrapper?.offsetWidth
|
|
443
452
|
|
|
444
453
|
labelY.style.marginTop = `-${this.leftLabel.length * 16}px`
|
|
445
|
-
this.cellWidth = width / this.matrix.length
|
|
454
|
+
this.cellWidth = Math.round(width / this.matrix.length)
|
|
446
455
|
colorSpectrum.style.height = `${width}px`
|
|
447
456
|
yAxisOuter.style.height = `${width}px`
|
|
448
457
|
},
|
|
@@ -460,7 +469,7 @@ export default defineComponent({
|
|
|
460
469
|
ctx.matrix.length / (brush.max - brush.min),
|
|
461
470
|
ctx.$refs.matrix
|
|
462
471
|
)
|
|
463
|
-
const scroll = brush.min *
|
|
472
|
+
const scroll = brush.min * getCellWidth()
|
|
464
473
|
const container = ctx.$refs.matrixWrapper
|
|
465
474
|
container.scroll(scroll, 0)
|
|
466
475
|
ctx.currentBrushState = brush
|
|
@@ -524,7 +533,6 @@ export default defineComponent({
|
|
|
524
533
|
&__element {
|
|
525
534
|
width: var(--cell-dimensions);
|
|
526
535
|
max-width: 100px;
|
|
527
|
-
overflow: hidden;
|
|
528
536
|
text-overflow: ellipsis;
|
|
529
537
|
&--text {
|
|
530
538
|
font-size: 12px;
|
|
@@ -575,9 +583,8 @@ export default defineComponent({
|
|
|
575
583
|
grid-template-columns: repeat(var(--matrix-rows), 1fr);
|
|
576
584
|
|
|
577
585
|
&__cell {
|
|
578
|
-
font-size:
|
|
586
|
+
font-size: calc(var(--cell-dimensions) * 0.33);
|
|
579
587
|
cursor: pointer;
|
|
580
|
-
border: 1px solid var(--dl-color-separator);
|
|
581
588
|
box-sizing: border-box;
|
|
582
589
|
width: var(--cell-dimensions);
|
|
583
590
|
height: var(--cell-dimensions);
|