Fix issue where notes annotations were not created correctly on iOS
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -78,13 +78,15 @@ export function HighlightsLayer(props: HighlightsLayerProps): JSX.Element {
|
||||
const focusedHighlightMousePos = useRef({ pageX: 0, pageY: 0 })
|
||||
|
||||
const [currentHighlightIdx, setCurrentHighlightIdx] = useState(0)
|
||||
const [focusedHighlight, setFocusedHighlight] =
|
||||
useState<Highlight | undefined>(undefined)
|
||||
const [focusedHighlight, setFocusedHighlight] = useState<
|
||||
Highlight | undefined
|
||||
>(undefined)
|
||||
|
||||
const [selectionData, setSelectionData] = useSelection(highlightLocations)
|
||||
|
||||
const [labelsTarget, setLabelsTarget] =
|
||||
useState<Highlight | undefined>(undefined)
|
||||
const [labelsTarget, setLabelsTarget] = useState<Highlight | undefined>(
|
||||
undefined
|
||||
)
|
||||
|
||||
const windowDimensions = useGetWindowDimensions()
|
||||
|
||||
@ -672,7 +674,7 @@ export function HighlightsLayer(props: HighlightsLayerProps): JSX.Element {
|
||||
dispatchHighlightMessage('noteCreated')
|
||||
} else {
|
||||
try {
|
||||
await createHighlightCallback()
|
||||
await createHighlightCallback(event.annotation)
|
||||
dispatchHighlightMessage('noteCreated')
|
||||
} catch (error) {
|
||||
dispatchHighlightError('saveAnnotation', error)
|
||||
|
||||
Reference in New Issue
Block a user