Repository navigation
feat(eew): trim the intensity legend to the painted maximum - #37
Merged
lowrt merged 1 commit intoNov 15, 2026
Merged
Conversation
lowrt
force-pushed
the
kitten/trim-the-intensity-legend-to-the-painted-mwdd9pcv
branch
from
November 12, 2026 15:32
1b90134 to
5a96ff4
Compare
whes1015
approved these changes
Nov 13, 2026
whes1015
left a comment
Member
There was a problem hiding this comment.
看過 head 5a96ff4 的 diff、著色與覆蓋的呼叫順序、圖例 CSS,CI 也全綠。
圖例上限用的是同一份 eewIntensityArea.max_i(0–9,跟 INTENSITY_LIST 和鄉鎮上色同一刻度)。有感才裁掉上面,1 級留在底部;每格高度仍是 210px(視窗矮於 660px 時 185px)除以 9。新的矮視窗規則比 globals.css 的固定 185px 更具體,裁過的色階不會被拉回去。震度報告、長周期覆蓋、沒塗到有感震度、速報結束清掉 cache 之後,都會回到 9 格。重播走同一條 drawEewArea。commit 有 Platform 和更新日誌。
合併前若方便,用一場速報或重播對一下最高格和地圖顏色。這次說明裡沒有畫面驗證。
Agent 代 whes1015 審核(Discord !YuYu1015 要求)
Platform: all New(zh-Hant): 地震速報時,圖例只顯示到地圖上實際塗到的最高震度 New(en-US): during an early warning, the legend stops at the highest intensity painted on the map Requested-on-Discord: 靈靈 ⇛ 臺南新營 (@liangliang5102, 452103762320949248) https://discord.com/channels/926545182407688273/1566483963550236863/1570372904510824499 Co-authored-by: lowrt <37591855+lowrt@users.noreply.github.com>
bamboo0403
force-pushed
the
kitten/trim-the-intensity-legend-to-the-painted-mwdd9pcv
branch
from
November 15, 2026 06:54
5a96ff4 to
fdbaed6
Compare
bamboo0403
approved these changes
Nov 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改了什麼
地震速報把鄉鎮塗上顏色時,左側震度圖例只畫到地圖實際塗到的最高震度,不再固定從 1 級排到 7 級。
上限是各報
eewIntensityArea.max_i的最大值(ML 模型算的鄉鎮震度,警報自帶的 area 更高時跟著提高),跟drawEewArea塗上去的是同一份。1 級留在最下面,只砍上面;每一格維持原來的高度(210px 除以 9 格,視窗矮於 660px 時是 185px 除以 9 格),所以下面的顏色不會整排位移。速報結束、沒塗到任何有感震度、或被震度報告/長周期地表運動蓋掉時,回到完整色階。重播走同一條
drawEewArea。沒改的
eq.max,不是這次圖例的上限。legacy/沒動。沒有速報時,圖例還是原來的 9 格。怎麼驗
沒有速報時,圖例應跟現在一樣(9 格、210px)。
速報塗色後,最高一格應等於地圖上最深的那個顏色,且 1 級還在原來的位置。報次升高、最高震度變高時,只往上長出新的格子。速報結束後恢復 9 格。
這次沒在本機跑 typecheck、建置或畫面。請 review 時看 CI,並用一場速報(或重播)對一下圖例和地圖。
討論串:https://discord.com/channels/926545182407688273/1566483963550236863
對照 DPIP:ExpTechTW/DPIP#659
由 @lowrt(Discord 靈靈 ⇛ 臺南新營)透過 kitten 開的 PR,合併前請人工 review。
觸發訊息:https://discord.com/channels/926545182407688273/1566483963550236863/1570372904510824499