handle Decimals with FocalPointPicker ?
-
Hi everyone,
I was wondering if there is a propper/native way to handle decimals for the focal point picker component ?
I’am building a simple gutenberg block, requiring precise positionning, with decimals (ex 88.5%) . I could surely handle this with custom fields, but I’m curious to know it if there would be a native way to handle this scenario<FocalPointPicker url={coverUrl ?? null} value={objectPosition} onChange={(focalPoint) => { handleChangeobjectPosition(focalPoint); }} resolvePoint={resolvepoint} />
I’ve tried using the
resolvePoint
method mentionned in the doc, which outputs a precise position, but the number with decimals then get rounded when passed to thehandleChange
function anyway.
Many thanks in advance for the Help,
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘handle Decimals with FocalPointPicker ?’ is closed to new replies.