Release v2.17.0: Implement cross-page & intra-page style, font-family, background token & navigation parity with regression gates S1-S4 (Plan #65) and adaptive mobile device detection & Group 3 mobile UI across all surfaces (Plan #66 Strategies 1A/2A/3A/4A)
This commit is contained in:
1 parent
ad8e84da57
commit
6c8a5bdaae
45 files changed
+693
-219
No files matched your search
+25
-6
@@ -1,5 +1,5 @@
|
||||
// /workspace/hyperstitionstudio-core/site/quant/quant-app.js
|
||||
// Interactive Quantitative Finance & Memetic Gematria Time-Series Workbench (v2.16.0)
|
||||
// Interactive Quantitative Finance & Memetic Gematria Time-Series Workbench (v2.17.0)
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
@@ -1050,19 +1050,38 @@
|
||||
renderDailyBrief();
|
||||
}
|
||||
|
||||
// Canvas scrub interaction
|
||||
canvas.addEventListener("click", function (ev) {
|
||||
// Canvas scrub interaction (mouse click + Strategy 4A mobile touchstart/touchmove scrubbing)
|
||||
function scrubCanvasAtClientX(clientX) {
|
||||
const rect = canvas.getBoundingClientRect();
|
||||
const relX = ((ev.clientX - rect.left) / rect.width) * canvas.width;
|
||||
const relX = ((clientX - rect.left) / Math.max(1, rect.width)) * canvas.width;
|
||||
const padL = 62, padR = 28;
|
||||
const ratio = (relX - padL) / (canvas.width - padL - padR);
|
||||
const rng = getActiveDateRange();
|
||||
const span = Math.max(1, rng.endIdx - rng.startIdx - 1);
|
||||
const idx = rng.startIdx + Math.round(ratio * span);
|
||||
state.selectedDateIdx = Math.max(rng.startIdx, Math.min(rng.endIdx - 1, idx));
|
||||
renderAll();
|
||||
const nextIdx = Math.max(rng.startIdx, Math.min(rng.endIdx - 1, idx));
|
||||
if (nextIdx !== state.selectedDateIdx) {
|
||||
state.selectedDateIdx = nextIdx;
|
||||
renderAll();
|
||||
}
|
||||
}
|
||||
|
||||
canvas.addEventListener("click", function (ev) {
|
||||
scrubCanvasAtClientX(ev.clientX);
|
||||
});
|
||||
|
||||
canvas.addEventListener("touchstart", function (ev) {
|
||||
if (ev.touches && ev.touches.length === 1) {
|
||||
scrubCanvasAtClientX(ev.touches[0].clientX);
|
||||
}
|
||||
}, { passive: true });
|
||||
|
||||
canvas.addEventListener("touchmove", function (ev) {
|
||||
if (ev.touches && ev.touches.length === 1) {
|
||||
scrubCanvasAtClientX(ev.touches[0].clientX);
|
||||
}
|
||||
}, { passive: true });
|
||||
|
||||
document.getElementById("prevDateBtn").onclick = function () {
|
||||
state.selectedDateIdx = Math.max(0, state.selectedDateIdx - 1);
|
||||
renderAll();
|
||||
|
||||
Reference in new issue
Block a user