We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ec520dc commit b22bddaCopy full SHA for b22bdda
1 file changed
app/explore/page.tsx
@@ -1100,7 +1100,12 @@ export default function ExplorePage() {
1100
<span className="text-slate-400">渲染点数:</span>
1101
<span>{formatNumberWithCommas(data?.returned ?? 0)}</span>
1102
</div>
1103
- {zoomDomain && (
+ {zoomDomain && dataBounds && (() => {
1104
+ const totalXRange = dataBounds.x[1] - dataBounds.x[0];
1105
+ const zoomXRange = zoomDomain.x[1] - zoomDomain.x[0];
1106
+ const zoomRatio = totalXRange > 0 ? zoomXRange / totalXRange : 1;
1107
+ return zoomRatio < 0.999;
1108
+ })() && (
1109
<button
1110
type="button"
1111
onClick={resetZoom}
0 commit comments