Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/SeanFeng91/worldhistoryviz
/ functions
Functions
255 in github.com/SeanFeng91/worldhistoryviz
⨍
Functions
255
◇
Types & classes
20
Method
filterByYear
(items, year, options = {})
js/map-utils.js:954
Function
filterEventsByCategory
(events, category)
js/data-loader.js:295
Method
filterEventsByTimeRange
* 过滤指定时间范围内的事件 * @param {Array} events - 事件数组 * @param {number} year - 目标年份 * @param {number} range - 范围(正负年数) * @returns {Array}
js/map-utils.js:366
Method
findClosestMapYear
(year)
js/map-core.js:239
Method
focusOnLocation
(map, lat, lng, zoomLevel = 12)
js/map-utils.js:972
Method
formatYear
* 格式化年份显示 * @param {number} year - 年份 * @returns {string} 格式化后的年份字符串
js/map-utils.js:868
Method
formatYear
(year)
js/map-features.js:152
Method
getAreaStyle
(category)
js/map-styles.js:357
Method
getMarkerStyle
(category)
js/map-styles.js:305
Function
getMigrationsForYear
(year)
js/data-loader.js:222
Method
getPathStyle
(category)
js/map-styles.js:333
Method
getRandomColor
()
js/map-styles.js:231
Function
getRelatedEvents
(events, eventId)
js/data-loader.js:273
Method
getTimelineAreaInfo
* 获取时间轴区域的边界信息 * 提供给地图和其他组件使用,以协调交互
js/timeline-manager.js:733
Method
handleDragEnd
(e)
js/timeline-manager.js:1725
Method
handleDragMove
(e)
js/timeline-manager.js:1677
Method
handleViewEventDetails
* 处理查看事件详情 * @param {string} eventId - 事件ID
js/app.js:660
Method
handleYearChanged
* 处理年份变化事件 * @param {number} year - 新的年份
js/app.js:645
Method
highlightEventsForYear
* 高亮指定年份的事件 * @param {number} year - 年份
js/events-manager.js:572
Method
initEventsManager
* 初始化事件管理器
js/app.js:401
Method
initialize
()
js/map-events.js:12
Method
initialize
()
js/map-core.js:31
Method
initialize
()
js/map-migrations.js:9
Method
initialize
* 初始化时间轴 * @param {Object} mapInstance - 地图实例,用于协调时间轴区域和地图交互
js/timeline-manager.js:142
Method
initialize
()
js/map-features.js:12
Method
isEventRelevantToYear
* 判断事件是否与当前年份相关 * @param {Object} event - 事件对象 * @param {number} currentYear - 当前年份 * @returns {boolean} 事件是否与当前年份相关
js/map-utils.js:708
Method
isInTimelineContainer
(e)
js/timeline-manager.js:569
Method
isMigrationRelevantToYear
* 检查迁徙是否与当前年份相关 * @param {Object} migration - 迁徙路线对象 * @param {number} currentYear - 当前年份 * @returns {boolean} 迁徙路线是否与当前年份相关
js/map-utils.js:779
Method
isSliderElement
(element)
js/timeline-manager.js:555
Function
loadCategories
()
js/data-loader.js:351
Method
migrationToGeoJSON
* 将迁徙路线转换为GeoJSON LineString * @param {Object} migration - 迁徙路线对象 * @param {number} progress - 完成百分比(0-1) * @returns {Object} GeoJSON L
js/map-utils.js:405
Method
setCategory
* 设置当前类别过滤器 * @param {string} category - 类别名称
js/events-manager.js:96
Method
setEventSelectedCallback
* 设置事件选择回调 * @param {Function} callback - 回调函数
js/events-manager.js:88
Method
setFilterCategory
(category)
js/map-events.js:75
Method
setPlaySpeed
* 设置播放速度 * @param {number} speed - 播放速度
js/timeline-manager.js:1598
Method
showLoader
* 显示加载指示器 * @param {string} message - 加载信息
js/app.js:537
Method
simpleHash
(str)
js/map-utils.js:925
Function
sortEventsByImportance
(events, descending = true)
js/data-loader.js:314
Function
sortEventsByYear
(events, ascending = true)
js/data-loader.js:333
Method
stopEvents
(e)
js/timeline-manager.js:585
Method
styleByCategory
* 按类别为GeoJSON特征着色 * @param {Object} feature - GeoJSON特征 * @returns {Object} 样式对象
js/map-utils.js:503
Method
toggleAgriculture
(isActive)
js/map-core.js:501
Method
toggleDiseases
(isActive)
js/map-core.js:497
Method
toggleEvents
(isActive)
js/map-core.js:477
Method
toggleMigrations
(isActive)
js/map-core.js:481
Method
toggleMigrations
(isVisible)
js/map-migrations.js:374
Method
toggleMigrations
* 切换迁移路径显示 * @param {boolean} visible - 是否显示
js/app.js:866
Method
toggleSidebar
* 切换侧边栏显示状态
js/app.js:670
Method
toggleSpecies
(isActive)
js/map-core.js:489
Method
toggleTechnologies
(isActive)
js/map-core.js:485
Method
toggleWars
(isActive)
js/map-core.js:493
Method
uniqueArray
(array, key)
js/map-utils.js:935
Method
updateToYear
(year, migrationsData)
js/map-migrations.js:14
Method
updateToYear
(year)
js/map-features.js:16
Method
yearToMapFilename
(year)
js/map-core.js:245
← previous
201–255 of 255, ranked by callers