Skip to content

Commit

Permalink
fix: invalid display of opacity value
Browse files Browse the repository at this point in the history
  • Loading branch information
sekiju committed Jan 16, 2025
1 parent b3eed84 commit 5dc7e2d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/common/mobile/lib/view/Draw.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const DrawView = ({ currentTool, setTool, settings, setSettings, colors,
<Sheet className='draw-sheet draw-sheet--color-picker' backdrop swipeToClose onSheetClosed={() => f7.sheet.open('.draw-sheet--settings')}>
<div className='draw-sheet-label'><span>{_t.textCustomColor}</span></div>
<WheelColorPicker
initialColor={settings.color}
initialColor={settings[currentTool].color}
onSelectColor={(color) => {
f7.sheet.close('.draw-sheet--color-picker')
addCustomColor(color)
Expand Down Expand Up @@ -60,14 +60,14 @@ export const DrawView = ({ currentTool, setTool, settings, setSettings, colors,
onRangeChange={(value) => setSettings({ lineSize: value })}
/>
{/*) : (*/}
{/* <input className='line-size-range--ios' type='range' min={0.5} max={10} step={0.5} value={settings.lineSize} onChange={(e) => setSettings({ lineSize: parseInt(e.target.value) })} />*/}
{/* <input className='line-size-range--ios' type='range' min={0.5} max={10} step={0.5} value={settings[currentTool].lineSize} onChange={(e) => setSettings({ lineSize: parseInt(e.target.value) })} />*/}
{/* )}*/}
</div>
<div className='draw-sheet-label'><span>{_t.textOpacity}</span></div>
<div className='draw-sheet-item'>
<input style={{ '--color': settings[currentTool].color }}
className={Device.android ? 'opacity-range-input--android' : 'opacity-range-input--ios'} type='range' min={0} max={100} step={1}
value={settings.opacity}
value={settings[currentTool].opacity}
onChange={(e) => setSettings({ opacity: parseInt(e.target.value) })}/>
</div>
</Sheet>
Expand Down

0 comments on commit 5dc7e2d

Please sign in to comment.