diff --git a/dsLightRag/XingJun/move.html b/dsLightRag/XingJun/move.html
index 83a74f73..860983f6 100644
--- a/dsLightRag/XingJun/move.html
+++ b/dsLightRag/XingJun/move.html
@@ -238,7 +238,10 @@
backgroundContainer.appendChild(centerDot);
backgroundContainer.removeEventListener('click', handleMapClick);
- saveAllElements(); // 中心点标记后自动保存
+
+ // 修复中心点保存 - 添加详细日志
+ console.log('[中心点] 已标记中心点:', { left: centerDot.style.left, top: centerDot.style.top });
+ saveAllElements(); // 确保保存中心点
}
backgroundContainer.addEventListener('click', handleMapClick);
@@ -399,7 +402,13 @@
}
localStorage.setItem('savedElements', JSON.stringify(elements));
- // 控制台输出详细保存信息
+ // 添加详细保存信息
+ const centerElement = elements.find(el => el.type === 'center');
+ if (centerElement) {
+ console.log(`[${new Date().toLocaleTimeString()}] 中心点已保存:`, centerElement);
+ } else {
+ console.log(`[${new Date().toLocaleTimeString()}] 未检测到中心点,未保存`);
+ }
console.log(`[${new Date().toLocaleTimeString()}] 自动保存完成: 共${elements.length}个元素`);
console.log('保存内容:', elements);
}
@@ -425,6 +434,7 @@
centerDot.style.left = item.left;
centerDot.style.top = item.top;
backgroundContainer.appendChild(centerDot);
+ console.log('[加载] 已恢复中心点:', item);
}
});
}