change tl subtick

This commit is contained in:
Tsuki 2025-08-27 22:24:26 +08:00
parent 687749f431
commit 4969f2d7e0
2 changed files with 4 additions and 4 deletions

View File

@ -257,7 +257,7 @@ export const Timeline: React.FC<Props> = React.memo(({
24625.670894409748, 24625.670894409748,
4964.7447283082365, 4964.7447283082365,
], ],
initialZoomLevel: 4964.7447283082365, initialZoomLevel: 24625.670894409748,
onDateChange: async (date: Date) => { onDateChange: async (date: Date) => {
const datestr = formatInTimeZone(date, 'UTC', 'yyyyMMddHHmmss') const datestr = formatInTimeZone(date, 'UTC', 'yyyyMMddHHmmss')
const url_base = process.env.NEXT_PUBLIC_GRAPHQL_BACKEND_URL?.replace('/graphql', '') || 'http://localhost:3050' const url_base = process.env.NEXT_PUBLIC_GRAPHQL_BACKEND_URL?.replace('/graphql', '') || 'http://localhost:3050'

View File

@ -74,7 +74,7 @@ interface TimelineConfig {
/** 初始中心时间(时间戳,默认当前时间) */ /** 初始中心时间(时间戳,默认当前时间) */
initialCenterTime?: number; initialCenterTime?: number;
/** 初始显示范围毫秒默认1小时 */ /** 初始显示范围毫秒默认1小时 */
initialTimeRange?: number; initialTimeRange?: number | null;
/** Initial Zoom Level */ /** Initial Zoom Level */
initialZoomLevel?: number | null; initialZoomLevel?: number | null;
/** 缩放模式 */ /** 缩放模式 */
@ -455,7 +455,7 @@ class ScaleManager {
{ {
level: TimeFormatLevel.HalfHour, level: TimeFormatLevel.HalfHour,
majorInterval: 30 * 60 * 1000, // 30分钟 majorInterval: 30 * 60 * 1000, // 30分钟
minorTicks: 3, // 每10分钟一个次刻度 minorTicks: 4, // 每10分钟一个次刻度
minPixelDistance: 50, minPixelDistance: 50,
maxPixelDistance: 120, maxPixelDistance: 120,
formatter: (date: Date) => ({ formatter: (date: Date) => ({
@ -937,7 +937,7 @@ class RealTimeTimeline {
const defaultConfig: Required<TimelineConfig> = { const defaultConfig: Required<TimelineConfig> = {
initialCenterTime: Date.now(), initialCenterTime: Date.now(),
initialTimeRange: 60 * 60 * 1000, // 1小时 initialTimeRange: null, // 1小时
initialZoomLevel: null, initialZoomLevel: null,
zoomMode: ZoomMode.MousePosition, zoomMode: ZoomMode.MousePosition,
zoomSensitivity: 0.001, zoomSensitivity: 0.001,