Refine quiz image zoom increments
This commit is contained in:
parent
dd959371d1
commit
e2c070b70b
1 changed files with 2 additions and 2 deletions
|
|
@ -1065,9 +1065,9 @@ const timerStarted = timeLeft !== null
|
|||
{expandedImagePath && (
|
||||
<div className="image-lightbox" role="dialog" aria-modal="true" aria-label="Expanded question image" onClick={() => setExpandedImagePath('')}>
|
||||
<div className="image-lightbox-controls" onClick={e => e.stopPropagation()}>
|
||||
<button type="button" onClick={() => adjustImageZoom(-0.5)} disabled={imageZoom <= 1}>-</button>
|
||||
<button type="button" onClick={() => adjustImageZoom(-0.1)} disabled={imageZoom <= 1}>-</button>
|
||||
<span>{Math.round(imageZoom * 100)}%</span>
|
||||
<button type="button" onClick={() => adjustImageZoom(0.5)} disabled={imageZoom >= 4}>+</button>
|
||||
<button type="button" onClick={() => adjustImageZoom(0.1)} disabled={imageZoom >= 4}>+</button>
|
||||
{[1, 2, 3, 4].map(zoom => (
|
||||
<button key={zoom} type="button" onClick={() => setImageZoom(zoom)} disabled={imageZoom === zoom}>{zoom}x</button>
|
||||
))}
|
||||
|
|
|
|||
Loading…
Reference in a new issue