Closed LTakhyunKim closed 1 month ago
DicomViewer λ₯Ό React Controlled Component λ‘ μ¬μ©ν μ μλλ‘ κΈ°λ₯μ ꡬνν©λλ€.
DicomViewer
onChange
useStackViewport
updateSnapshot
viewerFactory
npm run start:docs
What kind of change does this PR introduce?
N/A
Issue Number: N/A
DicomViewer κ° Controlled Component ννλ‘ λμν©λλ€.
https://github.com/user-attachments/assets/a0a5a327-4782-4bd2-adc8-0cc7acf0a466
π Description
DicomViewer
λ₯Ό React Controlled Component λ‘ μ¬μ©ν μ μλλ‘ κΈ°λ₯μ ꡬνν©λλ€.ꡬν μ¬ν
onChange
λ₯Ό νΈμΆνμ¬ μνλ₯Ό μ λ°μ΄νΈ ν©λλ€.DicomViewer
μ viewerInfo prop μ κ°μ΄ λ³κ²½λ κ²½μ°, μ΄λ₯Ό μ΄λ―Έμ§μ λ°μνμ¬ λ¦¬λ λλ§ ν©λλ€.ꡬν λ°©μ
useStackViewport
μμ useEffect λ₯Ό ν΅ν΄ eventCallback ν¨μλ‘ onChange λ₯Ό ν λΉνμ΅λλ€.useStackViewport
μμ useEffect λ₯Ό ν΅ν΄ viewerInfo prop μ΄ λ³κ²½λ κ²½μ°, viewerFactory μupdateSnapshot
μ νΈμΆν©λλ€.viewerFactory
μupdateSnapshot
μ ν΅ν΄ viewport λ₯Ό μ λ°μ΄νΈ ν©λλ€.νμΈ μμ² μ¬ν
npm run start:docs
λ₯Ό ν΅ν΄ DicomViewer κ° μ μ λ λλ§ λλμ§ νμΈ λΆνλ립λλ€.βοΈ PR Type
What kind of change does this PR introduce?
π― Current behavior
N/A
Issue Number: N/A
π New behavior
DicomViewer
κ° Controlled Component ννλ‘ λμν©λλ€.https://github.com/user-attachments/assets/a0a5a327-4782-4bd2-adc8-0cc7acf0a466
π£ Is this a breaking change?