Skip to content

Commit 2b9947f

Browse files
committed
Improvement - Add zoom drag optional feature
1 parent 6b91f17 commit 2b9947f

File tree

7 files changed

+13
-1
lines changed

7 files changed

+13
-1
lines changed

src/components/vue-ui-candlestick.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -874,6 +874,8 @@ defineExpose({
874874
v-model:end="slicer.end"
875875
:refreshStartPoint="FINAL_CONFIG.style.zoom.startIndex !== null ? FINAL_CONFIG.style.zoom.startIndex : 0"
876876
:refreshEndPoint="FINAL_CONFIG.style.zoom.endIndex !== null ? FINAL_CONFIG.style.zoom.endIndex + 1 : len"
877+
:enableRangeHandles="FINAL_CONFIG.style.zoom.enableRangeHandles"
878+
:enableSelectionDrag="FINAL_CONFIG.style.zoom.enableSelectionDrag"
877879
@reset="refreshSlicer"
878880
>
879881
<template #reset-action="{ reset }">

src/components/vue-ui-dashboard.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const isPaused = ref(false);
4848
4949
function handleInteraction(event) {
5050
const target = event.target;
51-
if (target.tagName === "INPUT" && target.type === "range") {
51+
if ((target.tagName === "INPUT" && target.type === "range") || target.classList.contains('range-handle')) {
5252
isPaused.value = true;
5353
}
5454
}

src/components/vue-ui-donut-evolution.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,6 +1061,8 @@ defineExpose({
10611061
v-model:end="slicer.end"
10621062
:refreshStartPoint="FINAL_CONFIG.style.chart.zoom.startIndex !== null ? FINAL_CONFIG.style.chart.zoom.startIndex : 0"
10631063
:refreshEndPoint="FINAL_CONFIG.style.chart.zoom.endIndex !== null ? FINAL_CONFIG.style.chart.zoom.endIndex + 1 : maxLength"
1064+
:enableRangeHandles="FINAL_CONFIG.style.chart.zoom.enableRangeHandles"
1065+
:enableSelectionDrag="FINAL_CONFIG.style.chart.zoom.enableSelectionDrag"
10641066
@reset="refreshSlicer"
10651067
>
10661068
<template #reset-action="{ reset }">

src/components/vue-ui-quick-chart.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1696,6 +1696,8 @@ defineExpose({
16961696
v-model:end="slicer.end"
16971697
:refreshStartPoint="FINAL_CONFIG.zoomStartIndex !== null ? FINAL_CONFIG.zoomStartIndex : 0"
16981698
:refreshEndPoint="FINAL_CONFIG.zoomEndIndex !== null ? FINAL_CONFIG.zoomEndIndex + 1 : formattedDataset.maxSeriesLength"
1699+
:enableRangeHandles="FINAL_CONFIG.zoomEnableRangeHandles"
1700+
:enableSelectionDrag="FINAL_CONFIG.zoomEnableSelectionDrag"
16991701
@reset="refreshSlicer"
17001702
@trapMouse="setCommonSelectedIndex"
17011703
>

src/components/vue-ui-stackbar.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1375,6 +1375,8 @@ defineExpose({
13751375
v-model:end="slicer.end"
13761376
:refreshStartPoint="FINAL_CONFIG.style.chart.zoom.startIndex !== null ? FINAL_CONFIG.style.chart.zoom.startIndex : 0"
13771377
:refreshEndPoint="FINAL_CONFIG.style.chart.zoom.endIndex !== null ? FINAL_CONFIG.style.chart.zoom.endIndex + 1 : Math.max(...dataset.map(ds => ds.series.length))"
1378+
:enableRangeHandles="FINAL_CONFIG.style.chart.zoom.enableRangeHandles"
1379+
:enableSelectionDrag="FINAL_CONFIG.style.chart.zoom.enableSelectionDrag"
13781380
@reset="refreshSlicer"
13791381
>
13801382
<template #reset-action="{ reset }">

src/components/vue-ui-xy-canvas.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1594,6 +1594,8 @@ defineExpose({
15941594
v-model:end="slicer.end"
15951595
:refreshStartPoint="FINAL_CONFIG.style.chart.zoom.startIndex !== null ? FINAL_CONFIG.style.chart.zoom.startIndex : 0"
15961596
:refreshEndPoint="FINAL_CONFIG.style.chart.zoom.endIndex !== null ? FINAL_CONFIG.style.chart.zoom.endIndex + 1 : maxSeries"
1597+
:enableRangeHandles="FINAL_CONFIG.style.chart.zoom.enableRangeHandles"
1598+
:enableSelectionDrag="FINAL_CONFIG.style.chart.zoom.enableSelectionDrag"
15971599
@reset="refreshSlicer"
15981600
>
15991601
<template #reset-action="{ reset }">

src/components/vue-ui-xy.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,6 +1106,8 @@
11061106
v-model:end="slicer.end"
11071107
:refreshStartPoint="FINAL_CONFIG.chart.zoom.startIndex !== null ? FINAL_CONFIG.chart.zoom.startIndex : 0"
11081108
:refreshEndPoint="FINAL_CONFIG.chart.zoom.endIndex !== null ? FINAL_CONFIG.chart.zoom.endIndex + 1 : Math.max(...dataset.map(datapoint => largestTriangleThreeBucketsArray({data:datapoint.series, threshold: FINAL_CONFIG.downsample.threshold}).length))"
1109+
:enableRangeHandles="FINAL_CONFIG.chart.zoom.enableRangeHandles"
1110+
:enableSelectionDrag="FINAL_CONFIG.chart.zoom.enableSelectionDrag"
11091111
@reset="refreshSlicer"
11101112
@trapMouse="selectMinimapIndex"
11111113
>

0 commit comments

Comments
 (0)