Skip to content

HOP canvas 렌더 순서 수정으로 rhwp 이미지 overlay 누락 방지#66

Merged
golbin merged 4 commits into
golbin:mainfrom
withqua:main
May 12, 2026
Merged

HOP canvas 렌더 순서 수정으로 rhwp 이미지 overlay 누락 방지#66
golbin merged 4 commits into
golbin:mainfrom
withqua:main

Conversation

@withqua

@withqua withqua commented May 12, 2026

Copy link
Copy Markdown
Contributor

HOP의 canvas-view.ts에서 페이지 렌더링 시 canvas가 DOM에 붙기 전에 PageRenderer.renderPage()가 호출되던 문제를 수정했습니다. rhwp 0.7.11의 PageRenderer는 BehindText / InFrontOfText 이미지를 canvas 옆의 overlay sibling으로 생성하는데, 기존 HOP 구현은 렌더 시점에 canvas parent가 없어 overlay 생성이 누락될 수 있었습니다.
이로 인해 레이아웃이 이상하게 유지될때가 있었습니다.

수정 내용

-renderPage() 호출 전에 canvas를 먼저 #scroll-content에 append
-append 전에 applyCanvasDisplayLayout()으로 top, left, width, height를 먼저 세팅
-렌더 후 canvas 크기가 확정되면 layout을 다시 적용하고, 생성된 overlay에도 같은 위치/크기 적용
-페이지 release, 전체 release, reset 시 canvas뿐 아니라 해당 page overlay도 같이 제거
-resize/reposition 시 overlay도 canvas와 같이 이동하도록 처리
-canvas-view.test.ts에 렌더 호출 시점에 canvas parent와 left 값이 준비되어 있는지 검증 추가

@withqua

withqua commented May 12, 2026

Copy link
Copy Markdown
Contributor Author
image 지금 문서 보정이 안되네요. rhwp에서는 비호환 문서인경우 문서보정이 되어 정상적으로 보입니다. HOP canvas 렌더 순서 수정으로 인한 문제가 아니네요. 마지막 커밋에서도 똑같은 현상이 일어납니다.

@withqua

withqua commented May 12, 2026

Copy link
Copy Markdown
Contributor Author
image 수정했습니다. HOP가 문서 보정 전에 sourceFormat === 'hwpx'로 한 번 더 막고 있어서, upstream rhwp처럼 getValidationWarnings() 결과가 있으면 바로 보정 모달/자동 보정 흐름으로 들어가도록 바꿨습니다.

Keep the PR 66 commits intact and add a focused HOP follow-up that preserves upstream overlay creation while replacing delayed full re-renders with flow-only re-renders. Split canvas layout and overlay lifecycle helpers out of CanvasView and tighten the validation baseline guard.
@golbin

golbin commented May 12, 2026

Copy link
Copy Markdown
Owner

Maintainer follow-up commit을 이 PR 브랜치에 직접 얹었습니다. 기존 작성자 커밋 3개는 그대로 두고, 마지막에 2722485 Refine PR 66 canvas overlay rendering만 추가했습니다.

추가 커밋에서는 upstream PageRenderer의 overlay 생성 책임은 유지하면서, delayed re-render가 full canvas render로 돌아가 overlay와 중복될 수 있는 경로를 HOP 쪽 wrapper에서 flow-only re-render로 보정했습니다. 또한 canvas layout/overlay lifecycle helper를 분리하고 관련 테스트를 보강했습니다.

@golbin golbin merged commit b20a771 into golbin:main May 12, 2026
golbin added a commit that referenced this pull request May 27, 2026
Preserve contributor commits and include maintainer follow-up for flow-only delayed canvas re-render handling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants