Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions lib/features/earthquake/data/eew_ml_max_source.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
import 'dart:async';

import 'package:dpip/core/error/failure.dart';
import 'package:dpip/core/error/result.dart';
import 'package:dpip/core/realtime/realtime_source.dart';
import 'package:dpip/features/earthquake/domain/eew.dart';
import 'package:dpip/features/earthquake/domain/eew_town_levels.dart';
import 'package:flutter/foundation.dart' show listEquals;

/// Raises an EEW payload's reported `max` when the ML model predicts a higher
/// nationwide township maximum before the alert reaches app consumers.
///
/// The reported value remains the minimum, including while the model loads or
/// cannot score a solution. Loading never delays a safety-critical alert; the
/// next fetch incorporates the model result once it is ready.
class EewMlMaxSource extends RealtimeSource<List<Eew>> {
EewMlMaxSource(this._source, this._model);

final RealtimeSource<List<Eew>> _source;
final MlIntensityEstimator _model;

@override
Future<Result<List<Eew>>> fetch() async {
final result = await _source.fetch();
final alerts = result.valueOrNull;
if (alerts == null || !alerts.any((alert) => !alert.isCancelled)) {
return result;
}
if (!_model.ready) {
unawaited(_model.prepare());
return result;
}
Comment on lines +29 to +32

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

performance · low
在 fetch 方法中,若 _model.ready 為 false,會透過 unawaited 呼叫 _model.prepare()。若在模型準備期間多次呼叫 fetch,可能會導致 _model.prepare() 被重複執行。建議確保 MlIntensityEstimator.prepare 的實作是冪等的(idempotent),或者在 fetch 中加入防止重複呼叫的機制,以避免不必要的資源消耗。

return switch (result) {
Ok(:final value, :final stale) => Ok(
await Future.wait(value.map(_withMlMaximum)),
stale: stale,
),
Err(:final failure) => Err(failure),
};
Comment on lines +33 to +39

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

performance · low
當 _source 同時回傳多個警報時,Future.wait 會併發呼叫 _model.townLevels。若 ML 模型在併發調用時消耗資源較多,需關注其效能表現與資源限制。

Suggestion:

Suggested change
return switch (result) {
Ok(:final value, :final stale) => Ok(
await Future.wait(value.map(_withMlMaximum)),
stale: stale,
),
Err(:final failure) => Err(failure),
};
// 若未來發現併發壓力過大,可考慮使用 concurrency limiter。

}

Future<Eew> _withMlMaximum(Eew alert) async {
if (alert.isCancelled) return alert;
final levels = await _model.townLevels(alert.info);
final paintedMax = levels == null ? null : highestPaintedLevel(levels);
if (paintedMax == null || paintedMax <= alert.info.max) return alert;
Comment on lines +44 to +46

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maintainability · low
_withMlMaximum 的邏輯目前依賴於 highestPaintedLevel。雖然目前實作看起來是正確的,但需確保 highestPaintedLevel 在處理邊界情況(如所有 level 為 0)時符合預期,以避免更新了錯誤的強度值。

Suggestion:

Suggested change
final levels = await _model.townLevels(alert.info);
final paintedMax = levels == null ? null : highestPaintedLevel(levels);
if (paintedMax == null || paintedMax <= alert.info.max) return alert;
// 建議在測試中增加更多針對 highestPaintedLevel 與不同 level 組合的邊界測試 case。

return alert.copyWith(info: alert.info.copyWith(max: paintedMax));
}
Comment on lines +42 to +48

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug · medium
在 fetch 方法中使用 Future.wait 處理 _withMlMaximum 時,若 _model.townLevels 拋出非 Result 類型的 Exception(而非回傳 Err),可能會導致整個 fetch 失敗。建議在 _withMlMaximum 中加入 try-catch 處理。

Suggestion:

Suggested change
Future<Eew> _withMlMaximum(Eew alert) async {
if (alert.isCancelled) return alert;
final levels = await _model.townLevels(alert.info);
final paintedMax = levels == null ? null : highestPaintedLevel(levels);
if (paintedMax == null || paintedMax <= alert.info.max) return alert;
return alert.copyWith(info: alert.info.copyWith(max: paintedMax));
}
Future<Eew> _withMlMaximum(Eew alert) async {
if (alert.isCancelled) return alert;
try {
final levels = await _model.townLevels(alert.info);
final paintedMax = levels == null ? null : highestPaintedLevel(levels);
if (paintedMax == null || paintedMax <= alert.info.max) return alert;
return alert.copyWith(info: alert.info.copyWith(max: paintedMax));
} catch (_) {
return alert;
}
}


@override
DateTime? timestampOf(List<Eew> value) => _source.timestampOf(value);

@override
bool sameData(List<Eew>? a, List<Eew>? b) => listEquals(a, b);

@override
bool get servingFallback => _source.servingFallback;

@override
bool isIgnorableFailure(Failure failure) =>
_source.isIgnorableFailure(failure);

@override
void pause() => _source.pause();

@override
void resume() => _source.resume();

@override
void networkChanged() => _source.networkChanged();

@override
void dispose() => _source.dispose();
}
25 changes: 25 additions & 0 deletions lib/features/earthquake/domain/eew_town_levels.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,28 @@ Future<({Map<String, int> levels, bool fromModel})> eewTownLevels(
fromModel: false,
);
}

/// The highest level in [levels] that the wash actually paints, or null when
/// it paints none (every township at 0 is transparent).
///
/// This is what the legend's ceiling has to follow, not the warning's reported
/// `max`: [eewTownLevels] scores townships itself — the ML model, or the
/// formula until it loads — and can put one higher than the round number the
/// alert reports. A colour painted on the map with no row beside it is read as
/// some other intensity, which is the one thing a legend may not do.
int? highestPaintedLevel(Map<String, int> levels) {
int? highest;
for (final level in levels.values) {
if (level <= 0) continue;
if (highest == null || level > highest) highest = level;
}
return highest;
}

/// Includes both the warning's maximum and every level painted on the map.
/// Returns null only when neither maximum is known.
int? legendCeiling({int? reportedMax, int? paintedMax}) {
if (reportedMax == null) return paintedMax;
if (paintedMax == null || reportedMax >= paintedMax) return reportedMax;
return paintedMax;
}
Comment on lines +75 to +79

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maintainability · low
新增的 highestPaintedLevel 與 legendCeiling 邏輯正確地處理了地圖繪製強度與警報報告最大值之間的關係。透過 legendCeiling 確保圖例的頂端(ceiling)會涵蓋 paintedMax,避免了地圖上已繪製顏色卻在圖例中找不到對應列的問題。

8 changes: 5 additions & 3 deletions lib/features/earthquake/earthquake_providers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import 'package:dpip/core/realtime/realtime_notifier.dart';
import 'package:dpip/core/realtime/realtime_source.dart';
import 'package:dpip/core/realtime/ticker.dart';
import 'package:dpip/features/earthquake/data/earthquake_api.dart';
import 'package:dpip/features/earthquake/data/eew_ml_max_source.dart';
import 'package:dpip/features/earthquake/data/eew_realtime_source.dart';
import 'package:dpip/features/earthquake/data/eew_repository_impl.dart';
import 'package:dpip/features/earthquake/data/ml_intensity_service.dart';
Expand Down Expand Up @@ -59,8 +60,9 @@ List<SingleChildWidget> earthquakeProviders(SharedDeps deps) {
// Held by the 強震監視器 while it is on screen: only then does the RTS feed
// need every frame, rather than the alerting ones the stream's sleep sends.
final rtsLiveDemand = RtsLiveDemand();
// ML v1 township estimates. Nothing is fetched or built here: the monitor
// calls `prepare` the first time it opens.
// ML v1 township estimates. The EEW source starts loading it on the first
// alert, then republishes it if the model's nationwide maximum is higher;
// the monitor reuses the same service for its township wash.
final mlIntensity = MlIntensityService(
client: deps.apiClient,
store: MlModelStore(deps.database.durable),
Expand Down Expand Up @@ -98,7 +100,7 @@ List<SingleChildWidget> earthquakeProviders(SharedDeps deps) {
poll: api.getEewRealtime,
) as RealtimeSource<List<Eew>>;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maintainability · low
此處的類型轉換 as RealtimeSource<List<Eew>> 是多餘的,因為 RealtimeSource 的建構子已經明確指定了泛型類型,且回傳值本身就是該類型。移除它可以讓程式碼更簡潔。

Suggestion:

Suggested change
) as RealtimeSource<List<Eew>>;
final eewSource = RealtimeSource<List<Eew>>(
poll: api.getEewRealtime,
);

final eewChannel = RealtimeChannel<List<Eew>>(
source: eewSource,
source: EewMlMaxSource(eewSource, mlIntensity),
clock: deps.serverClock,
elapsed: SystemElapsed(),
ticker: const SystemTicker(),
Expand Down
26 changes: 24 additions & 2 deletions lib/features/earthquake/presentation/pages/report_replay_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ class _ReportReplayPageState extends State<ReportReplayPage> {
/// digits four times out of five. Assigned only when the second changes.
final ValueNotifier<int> _clockSecond = ValueNotifier(0);

/// The highest level the replay's wash paints — the legend's ceiling. The
/// estimate belongs to the map ([_ReplayMapState._updateAreaFill]; the
/// legend lives up here beside the back button), so it is written back the
/// same way [_tick] travels down.
final ValueNotifier<int?> _paintedMaxLevel = ValueNotifier(null);

void _syncClockSecond() {
final second = _session.clock.now().millisecondsSinceEpoch ~/ 1000;
if (second == _clockSecond.value) return;
Expand Down Expand Up @@ -165,6 +171,7 @@ class _ReportReplayPageState extends State<ReportReplayPage> {
context.read<RealtimeService>().clock,
widget.replayTimestamp,
cwaOnly: () => cwaOnly.enabled,
mlIntensity: context.read<MlIntensityEstimator>(),
)..start();
_session.eew.addListener(_syncAnnouncement);
_immersive = context.read<MapImmersiveController>()
Expand Down Expand Up @@ -301,6 +308,7 @@ class _ReportReplayPageState extends State<ReportReplayPage> {
_clockSecond.dispose();
_immersive.removeListener(_onImmersiveChanged);
if (_immersive.value) _immersive.exit();
_paintedMaxLevel.dispose();
_session.dispose();
super.dispose();
}
Expand Down Expand Up @@ -334,6 +342,7 @@ class _ReportReplayPageState extends State<ReportReplayPage> {
tick: _tick,
clock: _session.clock,
eewIndex: _eewIndex,
paintedMaxLevel: _paintedMaxLevel,
immersive: immersive,
onImmersive: _immersive.enter,
),
Expand Down Expand Up @@ -382,18 +391,25 @@ class _ReportReplayPageState extends State<ReportReplayPage> {
// not whether the user asked to see it.
CollapsibleMapLegend(
legend: ListenableBuilder(
listenable: _session.eew,
listenable: Listenable.merge([
_session.eew,
_paintedMaxLevel,
]),
builder: (context, _) {
final alerts =
_session.eew.alerts.uncancelled;
final maxEewLevel = alerts.isEmpty
final alertMax = alerts.isEmpty
? null
: alerts
.map(
(alert) =>
alert.info.max.clamp(0, 9),
)
.reduce((a, b) => a > b ? a : b);
final maxEewLevel = legendCeiling(
reportedMax: alertMax,
paintedMax: _paintedMaxLevel.value,
);
return MapLegendCard(
child: IntensityLegend(
mode: alerts.isNotEmpty
Expand Down Expand Up @@ -524,6 +540,7 @@ class _ReplayMap extends StatefulWidget {
required this.tick,
required this.clock,
required this.eewIndex,
required this.paintedMaxLevel,
required this.immersive,
required this.onImmersive,
});
Expand Down Expand Up @@ -552,6 +569,9 @@ class _ReplayMap extends StatefulWidget {
/// showing, not always the newest.
final int eewIndex;

/// The highest level painted by the wash, for the page's legend.
final ValueNotifier<int?> paintedMaxLevel;

/// Whether the replay is in immersive mode. The map hides its own top-right
/// chrome with the rest of the page's.
final bool immersive;
Expand Down Expand Up @@ -1128,6 +1148,7 @@ class _ReplayMapState extends State<_ReplayMap> {
// with no alert up it paints nothing, so the OSM detailed ground —
// which mounts directly beneath it — keeps showing. The grey island is
// [countyFillLayerId]'s job, restored just above.
widget.paintedMaxLevel.value = null;
await controller.setLayerProperties(
townFillLayerId,
const FillLayerProperties(fillColor: '#00000000', fillOpacity: 0),
Expand All @@ -1146,6 +1167,7 @@ class _ReplayMapState extends State<_ReplayMap> {
// A newer alert, serial or the model itself took over while this one
// was being scored — its own update paints, not this stale one.
if (!mounted || key != _fillEewKey) return;
widget.paintedMaxLevel.value = highestPaintedLevel(estimate.levels);
final entries = <Object>[];
Comment on lines 1167 to 1171

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maintainability · low
在 _ReplayMapState 的 _onEewUpdate 方法中,直接對 widget.paintedMaxLevel.value 進行賦值。考慮到這是一個 ValueNotifier,雖然直接賦值是正確的,但如果該值更新頻率極高,建議檢查是否需要使用 debounce 或其他機制來避免不必要的 UI 重繪,特別是當 estimate.levels 頻繁變化時。此外,建議確保 widget.paintedMaxLevel 在 dispose 時已被正確清理,目前看起來是在 _ReportReplayPageState 中處理的,這是正確的。

Suggestion:

Suggested change
// A newer alert, serial or the model itself took over while this one
// was being scored — its own update paints, not this stale one.
if (!mounted || key != _fillEewKey) return;
widget.paintedMaxLevel.value = highestPaintedLevel(estimate.levels);
final entries = <Object>[];
// A newer alert, serial or the model itself took over while this one
// was being scored — its own update paints, not this stale one.
if (!mounted || key != _fillEewKey) return;
final newMaxLevel = highestPaintedLevel(estimate.levels);
if (widget.paintedMaxLevel.value != newMaxLevel) {
widget.paintedMaxLevel.value = newMaxLevel;
}
final entries = <Object>[];

Comment on lines 1169 to 1171

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maintainability · low
在 _ReplayMapState 的 _onEewUpdate 方法中,當 estimate.levels 為空時,highestPaintedLevel 會被傳入空集合,這在邏輯上是正確的,但應確保 highestPaintedLevel 函數本身能正確處理空集合並回傳 null,以避免潛在的錯誤或不符合預期的行為。

Suggestion:

Suggested change
if (!mounted || key != _fillEewKey) return;
widget.paintedMaxLevel.value = highestPaintedLevel(estimate.levels);
final entries = <Object>[];
if (!mounted || key != _fillEewKey) return;
// 確保 highestPaintedLevel 在處理空集合時會回傳 null
widget.paintedMaxLevel.value = highestPaintedLevel(estimate.levels);
final entries = <Object>[];

estimate.levels.forEach((code, level) {
if (level > 0) {
Expand Down
10 changes: 9 additions & 1 deletion lib/features/earthquake/replay_session.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ import 'package:dpip/core/realtime/realtime_config.dart';
import 'package:dpip/core/realtime/replay_clock.dart';
import 'package:dpip/core/realtime/ticker.dart';
import 'package:dpip/features/earthquake/data/earthquake_api.dart';
import 'package:dpip/features/earthquake/data/eew_ml_max_source.dart';
import 'package:dpip/features/earthquake/data/eew_replay_source.dart';
import 'package:dpip/features/earthquake/data/rts_replay_source.dart';
import 'package:dpip/features/earthquake/domain/eew.dart';
import 'package:dpip/features/earthquake/domain/eew_town_levels.dart';
import 'package:dpip/features/earthquake/domain/rts.dart';
import 'package:dpip/features/earthquake/presentation/eew_realtime_controller.dart';
import 'package:dpip/features/earthquake/presentation/rts_realtime_controller.dart';
Expand Down Expand Up @@ -44,6 +46,7 @@ class ReplaySession {
Clock serverClock,
int replayTimestamp, {
required bool Function() cwaOnly,
MlIntensityEstimator? mlIntensity,
}) {
final api = EarthquakeApi(apiClient);
final clock = ReplayClock(
Expand All @@ -58,7 +61,12 @@ class ReplaySession {
label: 'rts-replay',
);
final eewChannel = RealtimeChannel<List<Eew>>(
source: EewReplaySource(api, clock, cwaOnly: cwaOnly),
source: mlIntensity == null
? EewReplaySource(api, clock, cwaOnly: cwaOnly)
: EewMlMaxSource(
EewReplaySource(api, clock, cwaOnly: cwaOnly),
mlIntensity,
),
Comment on lines +64 to +69

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maintainability · low
在 ReplaySession 的建構式中,使用了條件運算子來決定 EewReplaySource 是否要被 EewMlMaxSource 包裝。如果 mlIntensity 為 null,則直接使用原始的 EewReplaySource;否則,則建立一個 EewMlMaxSource。建議可以將此邏輯封裝成一個 private method,以提升建構式的可讀性,特別是當未來有更多類似的包裝需求時。

Suggestion:

Suggested change
source: mlIntensity == null
? EewReplaySource(api, clock, cwaOnly: cwaOnly)
: EewMlMaxSource(
EewReplaySource(api, clock, cwaOnly: cwaOnly),
mlIntensity,
),
final baseEewSource = EewReplaySource(api, clock, cwaOnly: cwaOnly);
final eewSource = mlIntensity != null
? EewMlMaxSource(baseEewSource, mlIntensity)
: baseEewSource;
final eewChannel = RealtimeChannel<List<Eew>>(
source: eewSource,
clock: serverClock,
elapsed: SystemElapsed(),
ticker: const SystemTicker(),
);

Comment on lines +64 to +69

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maintainability · low
在 ReplaySession 的建構式中,建議將 EewMlMaxSource 的包裝邏輯提取出來,以增進程式碼的可讀性,特別是當未來有更多來源需要根據 mlIntensity 進行包裝時。

Suggestion:

Suggested change
source: mlIntensity == null
? EewReplaySource(api, clock, cwaOnly: cwaOnly)
: EewMlMaxSource(
EewReplaySource(api, clock, cwaOnly: cwaOnly),
mlIntensity,
),
final eewSource = EewReplaySource(api, clock, cwaOnly: cwaOnly);
final source = mlIntensity == null ? eewSource : EewMlMaxSource(eewSource, mlIntensity);
final eewChannel = RealtimeChannel<List<Eew>>(
source: source,
clock: serverClock,
elapsed: SystemElapsed(),
ticker: const SystemTicker(),
);

clock: serverClock,
elapsed: SystemElapsed(),
ticker: const SystemTicker(),
Expand Down
15 changes: 13 additions & 2 deletions lib/features/map/presentation/layers/rts_layer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,11 @@ class RtsMapLayer with MapLayerDefaults implements MapLayer {
/// Bumped on every feed notification, so the ranking card rebuilds with it.
final ValueNotifier<int> _rankingTick = ValueNotifier(0);

/// The highest level the current wash paints — the legend must include it
/// even when the active alerts' model-derived maximum belongs to another
/// warning.
final ValueNotifier<int?> _paintedMaxLevel = ValueNotifier(null);

/// Brightness captured from the last context-bearing call ([buildLegend] /
/// [buildSheet]) — the render/data-push methods get no `BuildContext`, but
/// the intensity icons come in light/dark artwork and the area fill needs
Expand Down Expand Up @@ -905,6 +910,7 @@ class RtsMapLayer with MapLayerDefaults implements MapLayer {
// with no alert up it paints nothing, so the OSM detailed ground —
// which mounts directly beneath it — keeps showing. The grey island is
// [countyFillLayerId]'s job, restored just above.
_paintedMaxLevel.value = null;
await controller.setLayerProperties(
townFillLayerId,
const FillLayerProperties(fillColor: '#00000000', fillOpacity: 0),
Expand All @@ -923,6 +929,7 @@ class RtsMapLayer with MapLayerDefaults implements MapLayer {
// A newer alert, serial or the model itself took over while this one
// was being scored — its own update paints, not this stale one.
if (key != _fillEewKey) return;
_paintedMaxLevel.value = highestPaintedLevel(estimate.levels);
final entries = <Object>[];
estimate.levels.forEach((code, level) {
if (level > 0) {
Expand Down Expand Up @@ -964,14 +971,18 @@ class RtsMapLayer with MapLayerDefaults implements MapLayer {
Widget buildLegend(BuildContext context) {
_captureBrightness(context);
return ListenableBuilder(
listenable: _eew,
listenable: Listenable.merge([_eew, _paintedMaxLevel]),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

other · low
透過 _paintedMaxLevel 與 Listenable.merge 同步圖例與繪製狀態,能有效處理數據與視覺表現不一致的情況,確保 UI 的一致性。

builder: (context, _) {
final alerts = (_eew.state.data ?? const <Eew>[]).uncancelled;
final maxEewLevel = alerts.isEmpty
final alertMax = alerts.isEmpty
? null
: alerts
.map((alert) => alert.info.max.clamp(0, 9))
.reduce((a, b) => a > b ? a : b);
final maxEewLevel = legendCeiling(
reportedMax: alertMax,
paintedMax: _paintedMaxLevel.value,
);
Comment on lines +977 to +985

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maintainability · low
此處透過 Listenable.merge 同時監聽 _eew 與 _paintedMaxLevel 的變化,並結合 legendCeiling 計算最終顯示的等級。這種做法能有效同步地圖視覺(wash)與數據報告(alertMax)之間的狀態,確保圖例顯示的強度等級與地圖上繪製的內容一致,避免使用者誤讀。

Suggestion:

Suggested change
final alertMax = alerts.isEmpty
? null
: alerts
.map((alert) => alert.info.max.clamp(0, 9))
.reduce((a, b) => a > b ? a : b);
final maxEewLevel = legendCeiling(
reportedMax: alertMax,
paintedMax: _paintedMaxLevel.value,
);
// 無須修改,此邏輯實作正確且具備高度魯棒性

return MapLegendCard(
child: IntensityLegend(
mode: _eewActive
Expand Down
5 changes: 5 additions & 0 deletions lib/shared/widgets/intensity_legend.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ class IntensityLegend extends StatelessWidget {
/// Highest discrete EEW level to show (`0`–`9`). Null shows the full scale.
/// Levels above it carry no information for the current warning and are
/// omitted to preserve map space.
///
/// This includes the maximum of the *wash*, which may differ from an
/// incoming warning's original reported maximum.
/// A level the map paints but this scale omits would be read as another
/// intensity.
Comment on lines +33 to +36

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

documentation · low
更新了 maxEewLevel 的文件註釋,明確說明其會包含 paintedMax 的值,這對於開發者理解圖例顯示邏輯非常有幫助。

final int? maxEewLevel;

/// Height of one scale cell / gradient step (px).
Expand Down
Loading
Loading