Debug: include gutter orientation + position in drag trace
This commit is contained in:
parent
4816f449d4
commit
d757117f95
1 changed files with 12 additions and 5 deletions
|
|
@ -105,13 +105,15 @@ export default function Gutter({
|
||||||
|
|
||||||
// Promote gesture: armed iff cursor is inside the sibling box AND
|
// Promote gesture: armed iff cursor is inside the sibling box AND
|
||||||
// past PROMOTE_TRIGGER_FRAC along the exit direction.
|
// past PROMOTE_TRIGGER_FRAC along the exit direction.
|
||||||
|
// TEMP DEBUG: trace which gutter is being dragged + the eval result.
|
||||||
|
// Remove once the issue is diagnosed.
|
||||||
if (info.promote) {
|
if (info.promote) {
|
||||||
const armed = isArmed(info.promote, xFrac, yFrac);
|
const armed = isArmed(info.promote, xFrac, yFrac);
|
||||||
// TEMP DEBUG: trace cursor + promote-eval each move so we can
|
|
||||||
// see why the gesture isn't arming on the user's setup.
|
|
||||||
// Remove this once the issue's diagnosed.
|
|
||||||
console.log("[gutter-drag]", {
|
console.log("[gutter-drag]", {
|
||||||
splitId: info.splitId,
|
orient: info.orientation,
|
||||||
|
gutterAt: info.orientation === "h"
|
||||||
|
? `x=${info.box.left.toFixed(2)}`
|
||||||
|
: `y=${info.box.top.toFixed(2)}`,
|
||||||
cursor: { x: xFrac.toFixed(3), y: yFrac.toFixed(3) },
|
cursor: { x: xFrac.toFixed(3), y: yFrac.toFixed(3) },
|
||||||
siblingBox: info.promote.siblingBox,
|
siblingBox: info.promote.siblingBox,
|
||||||
exitDirection: info.promote.exitDirection,
|
exitDirection: info.promote.exitDirection,
|
||||||
|
|
@ -119,7 +121,12 @@ export default function Gutter({
|
||||||
});
|
});
|
||||||
setArmed(armed);
|
setArmed(armed);
|
||||||
} else {
|
} else {
|
||||||
console.log("[gutter-drag] no promote context on", info.splitId);
|
console.log("[gutter-drag] NO promote (root split)", {
|
||||||
|
orient: info.orientation,
|
||||||
|
gutterAt: info.orientation === "h"
|
||||||
|
? `x=${info.box.left.toFixed(2)}`
|
||||||
|
: `y=${info.box.top.toFixed(2)}`,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[containerRef, info, flushPending, setArmed],
|
[containerRef, info, flushPending, setArmed],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue