You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: replace setTimeout polling with event relay in PdfEditor
The PdfEditor component was still using setTimeout-based polling to detect
when pdf-elements placement completed. With pdf-elements v1.2.0, this event
is now exposed directly via 'pdf-elements:adding-ended' event with a complete
event contract including the placement reason ('placed' or 'cancelled').
Changes:
- Remove pendingAddedObjectCount and pendingAddCheckTimer state
- Remove polling functions: clearPendingAddCheck, finishPendingAddCheck,
checkSignerAdded, scheduleSignerAddedCheck
- Remove document event listener registration (mouseup, touchend, keyup)
- Add handleAddingEnded(event: Event) to relay pdf-elements:adding-ended
directly to pdf-editor:adding-ended with the reason payload
- Update emit type definition to include payload with reason field
This completes the v1.2.0 migration from polling-based to event-driven
completion detection.
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
0 commit comments