Temporarily disable highlight on release
This commit is contained in:
@ -77,15 +77,13 @@ 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 [
|
||||
confirmDeleteHighlightWithNoteId,
|
||||
@ -578,12 +576,12 @@ export function HighlightsLayer(props: HighlightsLayerProps): JSX.Element {
|
||||
]
|
||||
)
|
||||
|
||||
useEffect(() => {
|
||||
if (props.highlightOnRelease) {
|
||||
handleAction('create')
|
||||
setSelectionData(null)
|
||||
}
|
||||
}, [selectionData, setSelectionData, handleAction, props.highlightOnRelease])
|
||||
// useEffect(() => {
|
||||
// if (props.highlightOnRelease) {
|
||||
// handleAction('create')
|
||||
// setSelectionData(null)
|
||||
// }
|
||||
// }, [selectionData, setSelectionData, handleAction, props.highlightOnRelease])
|
||||
|
||||
const dispatchHighlightError = (action: string, error: unknown) => {
|
||||
if (props.isAppleAppEmbed) {
|
||||
|
||||
Reference in New Issue
Block a user