hyperprop-charting-library 0.1.65 → 0.1.66
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/hyperprop-charting-library.cjs +1 -11
- package/dist/hyperprop-charting-library.js +1 -11
- package/dist/index.cjs +1 -11
- package/dist/index.js +1 -11
- package/package.json +1 -1
|
@@ -3522,15 +3522,10 @@ function createChart(element, options = {}) {
|
|
|
3522
3522
|
}
|
|
3523
3523
|
const midpoint = getMidpoint(first, second);
|
|
3524
3524
|
const anchorRatio = clamp((midpoint.x - drawState.chartLeft) / drawState.chartWidth, 0, 1);
|
|
3525
|
-
const startYMin = yMinOverride ?? drawState.yMin;
|
|
3526
|
-
const startYMax = yMaxOverride ?? drawState.yMax;
|
|
3527
3525
|
pinchZoomState = {
|
|
3528
3526
|
startDistance: Math.max(1, getPointerDistance(first, second)),
|
|
3529
3527
|
startSpan: xSpan,
|
|
3530
|
-
anchorIndex: drawState.xStart + anchorRatio * xSpan
|
|
3531
|
-
startMidpoint: midpoint,
|
|
3532
|
-
startYMin,
|
|
3533
|
-
startYMax
|
|
3528
|
+
anchorIndex: drawState.xStart + anchorRatio * xSpan
|
|
3534
3529
|
};
|
|
3535
3530
|
isDragging = false;
|
|
3536
3531
|
dragMode = null;
|
|
@@ -3559,11 +3554,6 @@ function createChart(element, options = {}) {
|
|
|
3559
3554
|
xSpan = nextSpan;
|
|
3560
3555
|
xCenter = nextStart + nextSpan / 2;
|
|
3561
3556
|
clampXViewport();
|
|
3562
|
-
const startYRange = pinchZoomState.startYMax - pinchZoomState.startYMin || 1;
|
|
3563
|
-
const priceShift = (midpoint.y - pinchZoomState.startMidpoint.y) / drawState.chartHeight * startYRange;
|
|
3564
|
-
const clampedY = clampYRange(pinchZoomState.startYMin + priceShift, pinchZoomState.startYMax + priceShift);
|
|
3565
|
-
yMinOverride = clampedY.min;
|
|
3566
|
-
yMaxOverride = clampedY.max;
|
|
3567
3557
|
updateFollowLatest(false);
|
|
3568
3558
|
emitViewportChange();
|
|
3569
3559
|
draw();
|
|
@@ -3498,15 +3498,10 @@ function createChart(element, options = {}) {
|
|
|
3498
3498
|
}
|
|
3499
3499
|
const midpoint = getMidpoint(first, second);
|
|
3500
3500
|
const anchorRatio = clamp((midpoint.x - drawState.chartLeft) / drawState.chartWidth, 0, 1);
|
|
3501
|
-
const startYMin = yMinOverride ?? drawState.yMin;
|
|
3502
|
-
const startYMax = yMaxOverride ?? drawState.yMax;
|
|
3503
3501
|
pinchZoomState = {
|
|
3504
3502
|
startDistance: Math.max(1, getPointerDistance(first, second)),
|
|
3505
3503
|
startSpan: xSpan,
|
|
3506
|
-
anchorIndex: drawState.xStart + anchorRatio * xSpan
|
|
3507
|
-
startMidpoint: midpoint,
|
|
3508
|
-
startYMin,
|
|
3509
|
-
startYMax
|
|
3504
|
+
anchorIndex: drawState.xStart + anchorRatio * xSpan
|
|
3510
3505
|
};
|
|
3511
3506
|
isDragging = false;
|
|
3512
3507
|
dragMode = null;
|
|
@@ -3535,11 +3530,6 @@ function createChart(element, options = {}) {
|
|
|
3535
3530
|
xSpan = nextSpan;
|
|
3536
3531
|
xCenter = nextStart + nextSpan / 2;
|
|
3537
3532
|
clampXViewport();
|
|
3538
|
-
const startYRange = pinchZoomState.startYMax - pinchZoomState.startYMin || 1;
|
|
3539
|
-
const priceShift = (midpoint.y - pinchZoomState.startMidpoint.y) / drawState.chartHeight * startYRange;
|
|
3540
|
-
const clampedY = clampYRange(pinchZoomState.startYMin + priceShift, pinchZoomState.startYMax + priceShift);
|
|
3541
|
-
yMinOverride = clampedY.min;
|
|
3542
|
-
yMaxOverride = clampedY.max;
|
|
3543
3533
|
updateFollowLatest(false);
|
|
3544
3534
|
emitViewportChange();
|
|
3545
3535
|
draw();
|
package/dist/index.cjs
CHANGED
|
@@ -3522,15 +3522,10 @@ function createChart(element, options = {}) {
|
|
|
3522
3522
|
}
|
|
3523
3523
|
const midpoint = getMidpoint(first, second);
|
|
3524
3524
|
const anchorRatio = clamp((midpoint.x - drawState.chartLeft) / drawState.chartWidth, 0, 1);
|
|
3525
|
-
const startYMin = yMinOverride ?? drawState.yMin;
|
|
3526
|
-
const startYMax = yMaxOverride ?? drawState.yMax;
|
|
3527
3525
|
pinchZoomState = {
|
|
3528
3526
|
startDistance: Math.max(1, getPointerDistance(first, second)),
|
|
3529
3527
|
startSpan: xSpan,
|
|
3530
|
-
anchorIndex: drawState.xStart + anchorRatio * xSpan
|
|
3531
|
-
startMidpoint: midpoint,
|
|
3532
|
-
startYMin,
|
|
3533
|
-
startYMax
|
|
3528
|
+
anchorIndex: drawState.xStart + anchorRatio * xSpan
|
|
3534
3529
|
};
|
|
3535
3530
|
isDragging = false;
|
|
3536
3531
|
dragMode = null;
|
|
@@ -3559,11 +3554,6 @@ function createChart(element, options = {}) {
|
|
|
3559
3554
|
xSpan = nextSpan;
|
|
3560
3555
|
xCenter = nextStart + nextSpan / 2;
|
|
3561
3556
|
clampXViewport();
|
|
3562
|
-
const startYRange = pinchZoomState.startYMax - pinchZoomState.startYMin || 1;
|
|
3563
|
-
const priceShift = (midpoint.y - pinchZoomState.startMidpoint.y) / drawState.chartHeight * startYRange;
|
|
3564
|
-
const clampedY = clampYRange(pinchZoomState.startYMin + priceShift, pinchZoomState.startYMax + priceShift);
|
|
3565
|
-
yMinOverride = clampedY.min;
|
|
3566
|
-
yMaxOverride = clampedY.max;
|
|
3567
3557
|
updateFollowLatest(false);
|
|
3568
3558
|
emitViewportChange();
|
|
3569
3559
|
draw();
|
package/dist/index.js
CHANGED
|
@@ -3498,15 +3498,10 @@ function createChart(element, options = {}) {
|
|
|
3498
3498
|
}
|
|
3499
3499
|
const midpoint = getMidpoint(first, second);
|
|
3500
3500
|
const anchorRatio = clamp((midpoint.x - drawState.chartLeft) / drawState.chartWidth, 0, 1);
|
|
3501
|
-
const startYMin = yMinOverride ?? drawState.yMin;
|
|
3502
|
-
const startYMax = yMaxOverride ?? drawState.yMax;
|
|
3503
3501
|
pinchZoomState = {
|
|
3504
3502
|
startDistance: Math.max(1, getPointerDistance(first, second)),
|
|
3505
3503
|
startSpan: xSpan,
|
|
3506
|
-
anchorIndex: drawState.xStart + anchorRatio * xSpan
|
|
3507
|
-
startMidpoint: midpoint,
|
|
3508
|
-
startYMin,
|
|
3509
|
-
startYMax
|
|
3504
|
+
anchorIndex: drawState.xStart + anchorRatio * xSpan
|
|
3510
3505
|
};
|
|
3511
3506
|
isDragging = false;
|
|
3512
3507
|
dragMode = null;
|
|
@@ -3535,11 +3530,6 @@ function createChart(element, options = {}) {
|
|
|
3535
3530
|
xSpan = nextSpan;
|
|
3536
3531
|
xCenter = nextStart + nextSpan / 2;
|
|
3537
3532
|
clampXViewport();
|
|
3538
|
-
const startYRange = pinchZoomState.startYMax - pinchZoomState.startYMin || 1;
|
|
3539
|
-
const priceShift = (midpoint.y - pinchZoomState.startMidpoint.y) / drawState.chartHeight * startYRange;
|
|
3540
|
-
const clampedY = clampYRange(pinchZoomState.startYMin + priceShift, pinchZoomState.startYMax + priceShift);
|
|
3541
|
-
yMinOverride = clampedY.min;
|
|
3542
|
-
yMaxOverride = clampedY.max;
|
|
3543
3533
|
updateFollowLatest(false);
|
|
3544
3534
|
emitViewportChange();
|
|
3545
3535
|
draw();
|