fix: position arrowhead at endpoint and increase size
- Position arrowhead at (2.0 - 0.03, 1.0 - 0.05) to be at arrow endpoint - Increase arrowhead size from 0.4x to 0.5x for better visibility - Remove bold weight so it renders as solid triangle pointing down
This commit is contained in:
parent
fab1fb10b7
commit
bdf28b21b2
|
|
@ -453,27 +453,26 @@ export function generateSubtractionProblemStackFunction(
|
|||
#text(size: ${(cellSizePt * 0.25).toFixed(1)}pt, fill: white, stroke: 0.3pt + black, weight: "bold")[1]
|
||||
]
|
||||
)
|
||||
// Draw curved arrow from top-right of borrow box to top of borrowed 10s box (one cell to the RIGHT visually)
|
||||
// Draw curved arrow from top-right of borrow box to top-left of borrowed 10s box
|
||||
#place(
|
||||
top + left,
|
||||
dx: ${cellSizeIn},
|
||||
path(
|
||||
stroke: (paint: white, thickness: 1pt),
|
||||
// Start at top-right corner of borrow box (0,0 since we're already positioned there)
|
||||
// Start at top-right corner of borrow box
|
||||
(0pt, 0pt),
|
||||
// Bezier curve - convex on upper right
|
||||
// Control point above and to the right
|
||||
(${(cellSize * 0.3).toFixed(2)}in, ${(cellSize * 0.2).toFixed(2)}in),
|
||||
// End at top-left of borrowed 10s box (one cell right visually, one cell down)
|
||||
// End at top-left of borrowed 10s box (one cell right, one cell down)
|
||||
(${cellSizeIn}, ${cellSizeIn}),
|
||||
)
|
||||
)
|
||||
// Arrowhead at the end
|
||||
// Arrowhead pointing down at the top-left of borrowed 10s box
|
||||
#place(
|
||||
top + left,
|
||||
dx: ${(cellSize * 2.0).toFixed(2)}in,
|
||||
dy: ${(cellSize * 0.95).toFixed(2)}in,
|
||||
text(size: ${(cellSizePt * 0.4).toFixed(1)}pt, fill: white, weight: "bold")[▼]
|
||||
dx: ${(cellSize * 2.0 - 0.03).toFixed(2)}in,
|
||||
dy: ${(cellSize * 1.0 - 0.05).toFixed(2)}in,
|
||||
text(size: ${(cellSizePt * 0.5).toFixed(1)}pt, fill: white)[▼]
|
||||
)
|
||||
]
|
||||
} else {
|
||||
|
|
@ -486,27 +485,26 @@ export function generateSubtractionProblemStackFunction(
|
|||
#text(size: ${(cellSizePt * 0.25).toFixed(1)}pt, fill: gray.darken(30%), weight: "bold")[1]
|
||||
]
|
||||
)
|
||||
// Draw curved arrow from top-right of borrow box to top of borrowed 10s box (one cell to the RIGHT visually)
|
||||
// Draw curved arrow from top-right of borrow box to top-left of borrowed 10s box
|
||||
#place(
|
||||
top + left,
|
||||
dx: ${cellSizeIn},
|
||||
path(
|
||||
stroke: (paint: gray.darken(30%), thickness: 1pt),
|
||||
// Start at top-right corner of borrow box (0,0 since we're already positioned there)
|
||||
// Start at top-right corner of borrow box
|
||||
(0pt, 0pt),
|
||||
// Bezier curve - convex on upper right
|
||||
// Control point above and to the right
|
||||
(${(cellSize * 0.3).toFixed(2)}in, ${(cellSize * 0.2).toFixed(2)}in),
|
||||
// End at top-left of borrowed 10s box (one cell right visually, one cell down)
|
||||
// End at top-left of borrowed 10s box (one cell right, one cell down)
|
||||
(${cellSizeIn}, ${cellSizeIn}),
|
||||
)
|
||||
)
|
||||
// Arrowhead at the end
|
||||
// Arrowhead pointing down at the top-left of borrowed 10s box
|
||||
#place(
|
||||
top + left,
|
||||
dx: ${(cellSize * 2.0).toFixed(2)}in,
|
||||
dy: ${(cellSize * 0.95).toFixed(2)}in,
|
||||
text(size: ${(cellSizePt * 0.4).toFixed(1)}pt, fill: gray.darken(30%), weight: "bold")[▼]
|
||||
dx: ${(cellSize * 2.0 - 0.03).toFixed(2)}in,
|
||||
dy: ${(cellSize * 1.0 - 0.05).toFixed(2)}in,
|
||||
text(size: ${(cellSizePt * 0.5).toFixed(1)}pt, fill: gray.darken(30%))[▼]
|
||||
)
|
||||
]
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue