-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[VIEWER-167] Heatmap Viewer 스펙 변경 #422
Conversation
Coverage report
Test suite run success66 tests passing in 9 suites. Report generated by 🧪jest coverage report action from c5634c7 |
@@ -53,10 +49,87 @@ export default function getHeatmapImageData({ | |||
pixels[offset] = pixVal[0] | |||
pixels[offset + 1] = pixVal[1] | |||
pixels[offset + 2] = pixVal[2] | |||
pixels[offset + 3] = (thPosProb * 196) << 0 | |||
pixels[offset + 3] = Math.round(255 * 0.35) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
반복문 내에서 사용되는 값이니 상수 사용하는 것이 좋겠습니다
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
상수로 선언 후 사용하는 방식으로 수정했습니다. 817ea51
return { heatmapData: heatmapImageData, heatmapCanvas } | ||
} | ||
|
||
function applyGaussianBlur(pixels: Uint8ClampedArray, width: number, height: number, sigma: number) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
직접 구현하기보다는 blur()
필터를 사용하는게 좋을 것 같습니다
https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/filter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
말씀해주신 것처럼 직접 구현한 로직 삭제 후, blur 방식을 적용했습니다. b831f8f
blur 를 적용한 기준 디자인은 디자인팀에 검수까지 받은 상태입니다.
} else if (v < 0.75) { | ||
r = 4 * (v - 0.5) | ||
b = 0 | ||
// Between 0.25 and 0.5: linearly convert from 74,230,255 to 221,255,0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
괄호를 넣어줘야 rbg임을 쉽게 알 수 있을 것 같습니다
// Between 0.25 and 0.5: linearly convert from 74,230,255 to 221,255,0 | |
// Between 0.25 and 0.5: linearly convert from (74,230,255) to (221,255,0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
말씀해주신 것처럼 괄호를 추가했습니다. 1160997
앗 그러고보니 이 PR을 v7에 머지한다면 기존 히트맵이 Legacy가 되면 breaking change에 해당하는 문제가 있네요 |
중요한 부분 짚어주셔서 감사합니다 🙏 |
Lastest는 그때그때 상대적인 개념이니 더 명확한 네이밍이면 좋겠습니다(CXR4Heatmap 이라거나) |
넵, 명확한 네이밍 고려해서 수정하겠습니다. 🙏 |
현재 Github Actions 서비스 자체에 문제가 생겨, 계속 Queued 상태입니다.
|
<OverlayLayer viewport={viewport} /> | ||
</InsightViewer> | ||
</Resizable> | ||
<InsightViewer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
각 뷰어 위에다 작게 이름(HeatmapViewer
) 써주면 좋겠네요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
말씀해주신 것처럼 각 Heatmap 의 title 을 추가했습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이전 히트맵과 새 히트맵 다 잘 나오는 것 확인했습니다. 머지하고 7.2.0 릴리스하면 되겠네요
📝 Description
Heatmap 표현 방식이 변경됨에 따라 Viewer 내 Heatmap 로직도 업데이트합니다.
업데이트 이미지
확인 방법
npm install
script 를 실행해서 패키지를 설치합니다.npm run start
script 를 실행해서 INSIGHT Viewer 문서를 확인합니다.UseOveralayContext
Tab 에서 변경된 Heatmap 을 확인합니다.✔️ PR Type
What kind of change does this PR introduce?
🎯 Current behavior
구버전 Heatmap Viewer spec 을 사용합니다.
Issue Number: N/A
🚀 New behavior
최신 버전 Heatmap Viewer spec 을 사용합니다.
💣 Is this a breaking change?