An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:sparkles: Support dragging mind map relationship connection points https://github.com/siyuan-note/siyuan/issues/20024
Daniel30af5dda0827
diff --git a/app/appearance/langs/ar.json b/app/appearance/langs/ar.jsonindex 77e6f68e70..8caa6d2881 100644--- a/app/appearance/langs/ar.json+++ b/app/appearance/langs/ar.json@@ -1,4 +1,7 @@{+ "listMindmapAnchorReset": "استعادة نقاط الاتصال التلقائية",+ "listMindmapAnchorFallback": "لا يمكن استخدام نقاط الاتصال المحددة في التخطيط الحالي؛ تُعرض نقاط اتصال تلقائية مؤقتًا",+ "listMindmapAnchorInvalid": "لا يمكن لنقطة الاتصال هذه تجنب العقد أو عناصر التحكم؛ اختر موضعًا آخر","listMindmapArrowDirection": "اتجاه السهم","listMindmapArrowForward": "سهم أمامي","listMindmapArrowReverse": "سهم عكسي",@@ -138,8 +141,8 @@"databaseCalendarView": "عرض التقويم لقاعدة البيانات","calendarClearDate": "مسح التاريخ","runtimeInfo": "معلومات التشغيل",- "listMindmapRouteStart": "اسحب لتغيير عقدة البداية",- "listMindmapRouteEnd": "اسحب لتغيير عقدة النهاية",+ "listMindmapRouteStart": "اسحب لتحريك نقطة اتصال البداية أو إعادة الاتصال بعقدة أخرى",+ "listMindmapRouteEnd": "اسحب لتحريك نقطة اتصال النهاية أو إعادة الاتصال بعقدة أخرى","listMindmapRouteHandle": "اسحب لضبط المسار؛ انقر نقرًا مزدوجًا على مقبض السحب لاستعادة الحساب التلقائي","listMindmapRouteFallback": "المسار المعدّل غير متاح في هذا التخطيط؛ يتم عرض المسار التلقائي","decisionModel": "نموذج اتخاذ القرار",diff --git a/app/appearance/langs/de.json b/app/appearance/langs/de.jsonindex 33a7573166..8e028fd706 100644--- a/app/appearance/langs/de.json+++ b/app/appearance/langs/de.json@@ -1,4 +1,7 @@{+ "listMindmapAnchorReset": "Automatische Verbindungspunkte wiederherstellen",+ "listMindmapAnchorFallback": "Die festgelegten Verbindungspunkte sind in diesem Layout nicht verfügbar; vorübergehend werden automatische Verbindungspunkte angezeigt",+ "listMindmapAnchorInvalid": "An diesem Verbindungspunkt können Knoten oder Bedienelemente nicht umgangen werden; wählen Sie eine andere Position","listMindmapArrowDirection": "Pfeilrichtung","listMindmapArrowForward": "Vorwärtspfeil","listMindmapArrowReverse": "Rückwärtspfeil",@@ -138,8 +141,8 @@"databaseCalendarView": "Datenbank-Kalenderansicht","calendarClearDate": "Datum löschen","runtimeInfo": "Laufzeitinformationen",- "listMindmapRouteStart": "Ziehen, um den Startknoten zu ändern",- "listMindmapRouteEnd": "Ziehen, um den Zielknoten zu ändern",+ "listMindmapRouteStart": "Ziehen, um den Startverbindungspunkt zu verschieben oder einen anderen Knoten zu verbinden",+ "listMindmapRouteEnd": "Ziehen, um den Endverbindungspunkt zu verschieben oder einen anderen Knoten zu verbinden","listMindmapRouteHandle": "Ziehen, um den Verlauf anzupassen; Doppelklick auf den Ziehpunkt stellt die automatische Berechnung wieder her","listMindmapRouteFallback": "Der angepasste Verlauf ist in diesem Layout nicht verfügbar; der automatische Verlauf wird angezeigt","decisionModel": "Entscheidungsmodell",diff --git a/app/appearance/langs/en.json b/app/appearance/langs/en.jsonindex 2cef585534..c40ff6f931 100644--- a/app/appearance/langs/en.json+++ b/app/appearance/langs/en.json@@ -1,4 +1,7 @@{+ "listMindmapAnchorReset": "Restore automatic connection points",+ "listMindmapAnchorFallback": "The specified connection points are unavailable in this layout; temporarily showing automatic connection points",+ "listMindmapAnchorInvalid": "This connection point cannot avoid nodes or controls; choose another position","listMindmapArrowDirection": "Arrow direction","listMindmapArrowForward": "Forward arrow","listMindmapArrowReverse": "Reverse arrow",@@ -138,8 +141,8 @@"databaseCalendarView": "Database calendar view","calendarClearDate": "Clear date","runtimeInfo": "Runtime information",- "listMindmapRouteStart": "Drag to change the start node",- "listMindmapRouteEnd": "Drag to change the end node",+ "listMindmapRouteStart": "Drag to move the start connection point or reconnect to another node",+ "listMindmapRouteEnd": "Drag to move the end connection point or reconnect to another node","listMindmapRouteHandle": "Drag to adjust the path; double-click the handle to reset","listMindmapRouteFallback": "The adjusted path is unavailable in this layout; showing the automatic path","decisionModel": "Decision model",diff --git a/app/appearance/langs/es.json b/app/appearance/langs/es.jsonindex 09a73f8ef4..27ce286aee 100644--- a/app/appearance/langs/es.json+++ b/app/appearance/langs/es.json@@ -1,4 +1,7 @@{+ "listMindmapAnchorReset": "Restaurar puntos de conexión automáticos",+ "listMindmapAnchorFallback": "Los puntos de conexión especificados no están disponibles en esta disposición; se muestran temporalmente puntos de conexión automáticos",+ "listMindmapAnchorInvalid": "Este punto de conexión no permite evitar nodos o controles; elige otra posición","listMindmapArrowDirection": "Dirección de la flecha","listMindmapArrowForward": "Flecha hacia delante","listMindmapArrowReverse": "Flecha inversa",@@ -138,8 +141,8 @@"databaseCalendarView": "Vista de calendario de la base de datos","calendarClearDate": "Borrar fecha","runtimeInfo": "Información de ejecución",- "listMindmapRouteStart": "Arrastra para cambiar el nodo inicial",- "listMindmapRouteEnd": "Arrastra para cambiar el nodo final",+ "listMindmapRouteStart": "Arrastra para mover el punto de conexión inicial o conectar con otro nodo",+ "listMindmapRouteEnd": "Arrastra para mover el punto de conexión final o conectar con otro nodo","listMindmapRouteHandle": "Arrastra para ajustar el trazado; haz doble clic en el controlador para restablecerlo","listMindmapRouteFallback": "El trazado ajustado no está disponible en esta disposición; se muestra el trazado automático","decisionModel": "Modelo de decisión",diff --git a/app/appearance/langs/fr.json b/app/appearance/langs/fr.jsonindex b2f4fe4f00..fd14f9cb7f 100644--- a/app/appearance/langs/fr.json+++ b/app/appearance/langs/fr.json@@ -1,4 +1,7 @@{+ "listMindmapAnchorReset": "Rétablir les points de connexion automatiques",+ "listMindmapAnchorFallback": "Les points de connexion définis ne sont pas disponibles dans cette disposition ; des points de connexion automatiques sont affichés temporairement",+ "listMindmapAnchorInvalid": "Ce point de connexion ne permet pas de contourner les nœuds ou les commandes ; choisissez une autre position","listMindmapArrowDirection": "Direction de la flèche","listMindmapArrowForward": "Flèche vers l’avant","listMindmapArrowReverse": "Flèche inversée",@@ -138,8 +141,8 @@"databaseCalendarView": "Vue calendrier de la base de données","calendarClearDate": "Effacer la date","runtimeInfo": "Informations d’exécution",- "listMindmapRouteStart": "Faites glisser pour changer le nœud de départ",- "listMindmapRouteEnd": "Faites glisser pour changer le nœud d’arrivée",+ "listMindmapRouteStart": "Faites glisser pour déplacer le point de connexion de départ ou connecter un autre nœud",+ "listMindmapRouteEnd": "Faites glisser pour déplacer le point de connexion d’arrivée ou connecter un autre nœud","listMindmapRouteHandle": "Faites glisser pour ajuster le tracé ; double-cliquez sur la poignée pour rétablir le calcul automatique","listMindmapRouteFallback": "Le tracé ajusté est indisponible dans cette disposition ; le tracé automatique est affiché","decisionModel": "Modèle de décision",diff --git a/app/appearance/langs/he.json b/app/appearance/langs/he.jsonindex dc517bb92b..e52f74b056 100644--- a/app/appearance/langs/he.json+++ b/app/appearance/langs/he.json@@ -1,4 +1,7 @@{+ "listMindmapAnchorReset": "שחזור נקודות חיבור אוטומטיות",+ "listMindmapAnchorFallback": "לא ניתן להשתמש בנקודות החיבור שהוגדרו בפריסה הנוכחית; נקודות חיבור אוטומטיות מוצגות באופן זמני",+ "listMindmapAnchorInvalid": "נקודת החיבור הזו אינה מאפשרת לעקוף צמתים או פקדים; יש לבחור מיקום אחר","listMindmapArrowDirection": "כיוון החץ","listMindmapArrowForward": "חץ קדימה","listMindmapArrowReverse": "חץ הפוך",@@ -138,8 +141,8 @@"databaseCalendarView": "תצוגת לוח שנה של מסד הנתונים","calendarClearDate": "ניקוי תאריך","runtimeInfo": "מידע על סביבת הריצה",- "listMindmapRouteStart": "גררו כדי לשנות את צומת ההתחלה",- "listMindmapRouteEnd": "גררו כדי לשנות את צומת הסיום",+ "listMindmapRouteStart": "יש לגרור כדי להזיז את נקודת החיבור ההתחלתית או להתחבר לצומת אחר",+ "listMindmapRouteEnd": "יש לגרור כדי להזיז את נקודת החיבור הסופית או להתחבר לצומת אחר","listMindmapRouteHandle": "גררו כדי להתאים את הנתיב; לחצו פעמיים על ידית הגרירה כדי לשחזר חישוב אוטומטי","listMindmapRouteFallback": "הנתיב המותאם אינו זמין בפריסה זו; מוצג הנתיב האוטומטי","decisionModel": "מודל החלטות",diff --git a/app/appearance/langs/hi.json b/app/appearance/langs/hi.jsonindex 2ea7361498..1312bdb5e9 100644--- a/app/appearance/langs/hi.json+++ b/app/appearance/langs/hi.json@@ -1,4 +1,7 @@{+ "listMindmapAnchorReset": "स्वचालित कनेक्शन बिंदु बहाल करें",+ "listMindmapAnchorFallback": "इस लेआउट में चुने गए कनेक्शन बिंदुओं का उपयोग नहीं हो सकता; अस्थायी रूप से स्वचालित कनेक्शन बिंदु दिखाए जा रहे हैं",+ "listMindmapAnchorInvalid": "इस कनेक्शन बिंदु से नोड या नियंत्रणों से बचना संभव नहीं है; कोई दूसरी स्थिति चुनें","listMindmapArrowDirection": "तीर की दिशा","listMindmapArrowForward": "आगे की ओर तीर","listMindmapArrowReverse": "उलटी दिशा में तीर",@@ -138,8 +141,8 @@"databaseCalendarView": "डेटाबेस कैलेंडर दृश्य","calendarClearDate": "तारीख साफ़ करें","runtimeInfo": "रनटाइम की जानकारी",- "listMindmapRouteStart": "आरंभिक नोड बदलने के लिए खींचें",- "listMindmapRouteEnd": "लक्ष्य नोड बदलने के लिए खींचें",+ "listMindmapRouteStart": "शुरुआती कनेक्शन बिंदु को खिसकाने या किसी दूसरे नोड से जोड़ने के लिए खींचें",+ "listMindmapRouteEnd": "अंतिम कनेक्शन बिंदु को खिसकाने या किसी दूसरे नोड से जोड़ने के लिए खींचें","listMindmapRouteHandle": "पथ समायोजित करने के लिए खींचें; स्वचालित गणना बहाल करने के लिए ड्रैग हैंडल पर दो बार क्लिक करें","listMindmapRouteFallback": "इस लेआउट में समायोजित पथ उपलब्ध नहीं है; स्वचालित पथ दिखाया जा रहा है","decisionModel": "निर्णय मॉडल",diff --git a/app/appearance/langs/id.json b/app/appearance/langs/id.jsonindex a092b7d119..0646336f24 100644--- a/app/appearance/langs/id.json+++ b/app/appearance/langs/id.json@@ -1,4 +1,7 @@{+ "listMindmapAnchorReset": "Pulihkan titik koneksi otomatis",+ "listMindmapAnchorFallback": "Titik koneksi yang ditentukan tidak tersedia dalam tata letak ini; titik koneksi otomatis ditampilkan sementara",+ "listMindmapAnchorInvalid": "Titik koneksi ini tidak dapat menghindari simpul atau kontrol; pilih posisi lain","listMindmapArrowDirection": "Arah panah","listMindmapArrowForward": "Panah maju","listMindmapArrowReverse": "Panah terbalik",@@ -138,8 +141,8 @@"databaseCalendarView": "Tampilan kalender basis data","calendarClearDate": "Hapus tanggal","runtimeInfo": "Informasi runtime",- "listMindmapRouteStart": "Seret untuk mengganti simpul awal",- "listMindmapRouteEnd": "Seret untuk mengganti simpul tujuan",+ "listMindmapRouteStart": "Seret untuk memindahkan titik koneksi awal atau menghubungkan ke simpul lain",+ "listMindmapRouteEnd": "Seret untuk memindahkan titik koneksi akhir atau menghubungkan ke simpul lain","listMindmapRouteHandle": "Seret untuk menyesuaikan jalur; klik dua kali pada pegangan seret untuk mengembalikan perhitungan otomatis","listMindmapRouteFallback": "Jalur yang disesuaikan tidak tersedia dalam tata letak ini; jalur otomatis ditampilkan","decisionModel": "Model keputusan",diff --git a/app/appearance/langs/it.json b/app/appearance/langs/it.jsonindex fd3e2ff5c2..fa3d8c94b8 100644--- a/app/appearance/langs/it.json+++ b/app/appearance/langs/it.json@@ -1,4 +1,7 @@{+ "listMindmapAnchorReset": "Ripristina i punti di connessione automatici",+ "listMindmapAnchorFallback": "I punti di connessione specificati non sono disponibili in questa disposizione; vengono mostrati temporaneamente punti di connessione automatici",+ "listMindmapAnchorInvalid": "Questo punto di connessione non consente di evitare nodi o controlli; scegli un’altra posizione","listMindmapArrowDirection": "Direzione della freccia","listMindmapArrowForward": "Freccia in avanti","listMindmapArrowReverse": "Freccia inversa",@@ -138,8 +141,8 @@"databaseCalendarView": "Vista calendario del database","calendarClearDate": "Cancella data","runtimeInfo": "Informazioni di esecuzione",- "listMindmapRouteStart": "Trascina per cambiare il nodo iniziale",- "listMindmapRouteEnd": "Trascina per cambiare il nodo di destinazione",+ "listMindmapRouteStart": "Trascina per spostare il punto di connessione iniziale o collegare un altro nodo",+ "listMindmapRouteEnd": "Trascina per spostare il punto di connessione finale o collegare un altro nodo","listMindmapRouteHandle": "Trascina per regolare il percorso; fai doppio clic sulla maniglia per ripristinare il calcolo automatico","listMindmapRouteFallback": "Il percorso modificato non è disponibile in questa disposizione; viene mostrato il percorso automatico","decisionModel": "Modello decisionale",diff --git a/app/appearance/langs/ja.json b/app/appearance/langs/ja.jsonindex ce9e19d4cf..c308b357e2 100644--- a/app/appearance/langs/ja.json+++ b/app/appearance/langs/ja.json@@ -1,4 +1,7 @@{+ "listMindmapAnchorReset": "接続位置を自動に戻す",+ "listMindmapAnchorFallback": "現在のレイアウトでは指定した接続位置を使用できないため、一時的に自動の接続位置を表示しています",+ "listMindmapAnchorInvalid": "この接続位置ではノードや操作ボタンを避けられません。位置を調整してください","listMindmapArrowDirection": "矢印の方向","listMindmapArrowForward": "順方向の矢印","listMindmapArrowReverse": "逆方向の矢印",@@ -138,8 +141,8 @@"databaseCalendarView": "データベースのカレンダービュー","calendarClearDate": "日付をクリア","runtimeInfo": "実行環境情報",- "listMindmapRouteStart": "ドラッグして始点ノードを変更",- "listMindmapRouteEnd": "ドラッグして終点ノードを変更",+ "listMindmapRouteStart": "ドラッグして始点の接続位置を調整するか、別のノードに接続",+ "listMindmapRouteEnd": "ドラッグして終点の接続位置を調整するか、別のノードに接続","listMindmapRouteHandle": "ドラッグして経路を調整、ハンドルをダブルクリックして自動計算に戻す","listMindmapRouteFallback": "現在のレイアウトでは手動の経路を使用できないため、自動の経路を表示しています","decisionModel": "判定モデル",diff --git a/app/appearance/langs/ko.json b/app/appearance/langs/ko.jsonindex 2283b10f22..6b97b30bac 100644--- a/app/appearance/langs/ko.json+++ b/app/appearance/langs/ko.json@@ -1,4 +1,7 @@{+ "listMindmapAnchorReset": "자동 연결 지점 복원",+ "listMindmapAnchorFallback": "현재 레이아웃에서는 지정한 연결 지점을 사용할 수 없어 임시로 자동 연결 지점을 표시합니다",+ "listMindmapAnchorInvalid": "이 연결 지점에서는 노드나 컨트롤을 피할 수 없습니다. 다른 위치를 선택하세요","listMindmapArrowDirection": "화살표 방향","listMindmapArrowForward": "정방향 화살표","listMindmapArrowReverse": "역방향 화살표",@@ -138,8 +141,8 @@"databaseCalendarView": "데이터베이스 달력 보기","calendarClearDate": "날짜 지우기","runtimeInfo": "실행 환경 정보",- "listMindmapRouteStart": "드래그하여 시작 노드 변경",- "listMindmapRouteEnd": "드래그하여 대상 노드 변경",+ "listMindmapRouteStart": "드래그하여 시작 연결 지점을 이동하거나 다른 노드에 연결",+ "listMindmapRouteEnd": "드래그하여 끝 연결 지점을 이동하거나 다른 노드에 연결","listMindmapRouteHandle": "드래그하여 경로 조정, 드래그 핸들을 두 번 클릭하여 자동 계산으로 복원","listMindmapRouteFallback": "현재 레이아웃에서는 수동 경로를 사용할 수 없어 자동 경로를 표시합니다","decisionModel": "판단 모델",diff --git a/app/appearance/langs/nl.json b/app/appearance/langs/nl.jsonindex 0fa2aacdbe..77459683f4 100644--- a/app/appearance/langs/nl.json+++ b/app/appearance/langs/nl.json@@ -1,4 +1,7 @@{+ "listMindmapAnchorReset": "Automatische verbindingspunten herstellen",+ "listMindmapAnchorFallback": "De opgegeven verbindingspunten zijn niet beschikbaar in deze indeling; er worden tijdelijk automatische verbindingspunten weergegeven",+ "listMindmapAnchorInvalid": "Dit verbindingspunt kan knooppunten of bedieningselementen niet ontwijken; kies een andere positie","listMindmapArrowDirection": "Pijlrichting","listMindmapArrowForward": "Pijl vooruit","listMindmapArrowReverse": "Omgekeerde pijl",@@ -138,8 +141,8 @@"databaseCalendarView": "Kalenderweergave van database","calendarClearDate": "Datum wissen","runtimeInfo": "Runtime-informatie",- "listMindmapRouteStart": "Sleep om het beginknooppunt te wijzigen",- "listMindmapRouteEnd": "Sleep om het doelknooppunt te wijzigen",+ "listMindmapRouteStart": "Sleep om het beginverbindingspunt te verplaatsen of verbinding te maken met een ander knooppunt",+ "listMindmapRouteEnd": "Sleep om het eindverbindingspunt te verplaatsen of verbinding te maken met een ander knooppunt","listMindmapRouteHandle": "Sleep om het pad aan te passen; dubbelklik op de sleepgreep om de automatische berekening te herstellen","listMindmapRouteFallback": "Het aangepaste pad is niet beschikbaar in deze indeling; het automatische pad wordt getoond","decisionModel": "Beslismodel",diff --git a/app/appearance/langs/pl.json b/app/appearance/langs/pl.jsonindex 7e570ac1f7..1c216d38e5 100644--- a/app/appearance/langs/pl.json+++ b/app/appearance/langs/pl.json@@ -1,4 +1,7 @@{+ "listMindmapAnchorReset": "Przywróć automatyczne punkty połączenia",+ "listMindmapAnchorFallback": "Wybrane punkty połączenia są niedostępne w tym układzie; tymczasowo wyświetlane są automatyczne punkty połączenia",+ "listMindmapAnchorInvalid": "Ten punkt połączenia nie pozwala ominąć węzłów lub elementów sterujących; wybierz inną pozycję","listMindmapArrowDirection": "Kierunek strzałki","listMindmapArrowForward": "Strzałka do przodu","listMindmapArrowReverse": "Strzałka odwrotna",@@ -138,8 +141,8 @@"databaseCalendarView": "Widok kalendarza bazy danych","calendarClearDate": "Wyczyść datę","runtimeInfo": "Informacje o środowisku uruchomieniowym",- "listMindmapRouteStart": "Przeciągnij, aby zmienić węzeł początkowy",- "listMindmapRouteEnd": "Przeciągnij, aby zmienić węzeł docelowy",+ "listMindmapRouteStart": "Przeciągnij, aby przesunąć początkowy punkt połączenia lub połączyć z innym węzłem",+ "listMindmapRouteEnd": "Przeciągnij, aby przesunąć końcowy punkt połączenia lub połączyć z innym węzłem","listMindmapRouteHandle": "Przeciągnij, aby dostosować przebieg; kliknij dwukrotnie uchwyt, aby przywrócić automatyczne wyznaczanie","listMindmapRouteFallback": "Dostosowany przebieg jest niedostępny w tym układzie; wyświetlany jest przebieg automatyczny","decisionModel": "Model decyzyjny",diff --git a/app/appearance/langs/pt-BR.json b/app/appearance/langs/pt-BR.jsonindex 1fbdf924e5..5943c4bb34 100644--- a/app/appearance/langs/pt-BR.json+++ b/app/appearance/langs/pt-BR.json@@ -1,4 +1,7 @@{+ "listMindmapAnchorReset": "Restaurar pontos de conexão automáticos",+ "listMindmapAnchorFallback": "Os pontos de conexão definidos não estão disponíveis neste layout; pontos de conexão automáticos são exibidos temporariamente",+ "listMindmapAnchorInvalid": "Este ponto de conexão não permite desviar de nós ou controles; escolha outra posição","listMindmapArrowDirection": "Direção da seta","listMindmapArrowForward": "Seta para frente","listMindmapArrowReverse": "Seta invertida",@@ -138,8 +141,8 @@"databaseCalendarView": "Visualização de calendário do banco de dados","calendarClearDate": "Limpar data","runtimeInfo": "Informações de execução",- "listMindmapRouteStart": "Arraste para alterar o nó inicial",- "listMindmapRouteEnd": "Arraste para alterar o nó de destino",+ "listMindmapRouteStart": "Arraste para mover o ponto de conexão inicial ou conectar a outro nó",+ "listMindmapRouteEnd": "Arraste para mover o ponto de conexão final ou conectar a outro nó","listMindmapRouteHandle": "Arraste para ajustar o trajeto; clique duas vezes na alça para restaurar o cálculo automático","listMindmapRouteFallback": "O trajeto ajustado não está disponível neste leiaute; exibindo o trajeto automático","decisionModel": "Modelo de decisão",diff --git a/app/appearance/langs/ru.json b/app/appearance/langs/ru.jsonindex fbeabccdaa..aed79ff53e 100644--- a/app/appearance/langs/ru.json+++ b/app/appearance/langs/ru.json@@ -1,4 +1,7 @@{+ "listMindmapAnchorReset": "Восстановить автоматические точки соединения",+ "listMindmapAnchorFallback": "Заданные точки соединения недоступны при текущем расположении; временно отображаются автоматические точки соединения",+ "listMindmapAnchorInvalid": "Эта точка соединения не позволяет обойти узлы или элементы управления; выберите другое положение","listMindmapArrowDirection": "Направление стрелки","listMindmapArrowForward": "Прямая стрелка","listMindmapArrowReverse": "Обратная стрелка",@@ -138,8 +141,8 @@"databaseCalendarView": "Календарное представление базы данных","calendarClearDate": "Очистить дату","runtimeInfo": "Информация о среде выполнения",- "listMindmapRouteStart": "Перетащите, чтобы изменить начальный узел",- "listMindmapRouteEnd": "Перетащите, чтобы изменить конечный узел",+ "listMindmapRouteStart": "Перетащите, чтобы переместить начальную точку соединения или подключить другой узел",+ "listMindmapRouteEnd": "Перетащите, чтобы переместить конечную точку соединения или подключить другой узел","listMindmapRouteHandle": "Перетащите, чтобы изменить путь; дважды щёлкните маркер перетаскивания, чтобы восстановить автоматический расчёт","listMindmapRouteFallback": "Изменённый путь недоступен в этой компоновке; показан автоматический путь","decisionModel": "Модель принятия решений",diff --git a/app/appearance/langs/sk.json b/app/appearance/langs/sk.jsonindex 5a0d9c4281..082660a62c 100644--- a/app/appearance/langs/sk.json+++ b/app/appearance/langs/sk.json@@ -1,4 +1,7 @@{+ "listMindmapAnchorReset": "Obnoviť automatické body pripojenia",+ "listMindmapAnchorFallback": "Určené body pripojenia nie sú v tomto rozložení dostupné; dočasne sa zobrazujú automatické body pripojenia",+ "listMindmapAnchorInvalid": "Tento bod pripojenia neumožňuje obísť uzly alebo ovládacie prvky; vyberte inú polohu","listMindmapArrowDirection": "Smer šípky","listMindmapArrowForward": "Šípka vpred","listMindmapArrowReverse": "Opačná šípka",@@ -138,8 +141,8 @@"databaseCalendarView": "Kalendárové zobrazenie databázy","calendarClearDate": "Vymazať dátum","runtimeInfo": "Informácie o prostredí behu",- "listMindmapRouteStart": "Potiahnutím zmeníte počiatočný uzol",- "listMindmapRouteEnd": "Potiahnutím zmeníte cieľový uzol",+ "listMindmapRouteStart": "Potiahnutím presuniete začiatočný bod pripojenia alebo pripojíte iný uzol",+ "listMindmapRouteEnd": "Potiahnutím presuniete koncový bod pripojenia alebo pripojíte iný uzol","listMindmapRouteHandle": "Potiahnutím upravíte trasu; dvojitým kliknutím na úchyt obnovíte automatický výpočet","listMindmapRouteFallback": "Upravená trasa nie je v tomto rozložení dostupná; zobrazuje sa automatická trasa","decisionModel": "Rozhodovací model",diff --git a/app/appearance/langs/sr.json b/app/appearance/langs/sr.jsonindex 8bdade9e52..897d64b66d 100644--- a/app/appearance/langs/sr.json+++ b/app/appearance/langs/sr.json@@ -1,4 +1,7 @@{+ "listMindmapAnchorReset": "Врати аутоматске тачке повезивања",+ "listMindmapAnchorFallback": "Задате тачке повезивања нису доступне у овом распореду; привремено се приказују аутоматске тачке повезивања",+ "listMindmapAnchorInvalid": "Ова тачка повезивања не омогућава заобилажење чворова или контрола; изаберите други положај","listMindmapArrowDirection": "Смер стрелице","listMindmapArrowForward": "Стрелица унапред","listMindmapArrowReverse": "Обрнута стрелица",@@ -138,8 +141,8 @@"databaseCalendarView": "Календарски приказ базе података","calendarClearDate": "Обриши датум","runtimeInfo": "Информације о извршавању",- "listMindmapRouteStart": "Превуците да промените почетни чвор",- "listMindmapRouteEnd": "Превуците да промените одредишни чвор",+ "listMindmapRouteStart": "Превуците да померите почетну тачку повезивања или повежете други чвор",+ "listMindmapRouteEnd": "Превуците да померите крајњу тачку повезивања или повежете други чвор","listMindmapRouteHandle": "Превуците да подесите путању; двапут кликните на ручицу за превлачење да вратите аутоматско израчунавање","listMindmapRouteFallback": "Подешена путања није доступна у овом распореду; приказује се аутоматска путања","decisionModel": "Модел за одлучивање",diff --git a/app/appearance/langs/th.json b/app/appearance/langs/th.jsonindex 3da8d3cfbd..a84c6b0981 100644--- a/app/appearance/langs/th.json+++ b/app/appearance/langs/th.json@@ -1,4 +1,7 @@{+ "listMindmapAnchorReset": "คืนค่าจุดเชื่อมต่ออัตโนมัติ",+ "listMindmapAnchorFallback": "ไม่สามารถใช้จุดเชื่อมต่อที่ระบุในเค้าโครงปัจจุบันได้ จึงแสดงจุดเชื่อมต่ออัตโนมัติชั่วคราว",+ "listMindmapAnchorInvalid": "จุดเชื่อมต่อนี้ไม่สามารถหลีกเลี่ยงโหนดหรือส่วนควบคุมได้ โปรดเลือกตำแหน่งอื่น","listMindmapArrowDirection": "ทิศทางลูกศร","listMindmapArrowForward": "ลูกศรไปข้างหน้า","listMindmapArrowReverse": "ลูกศรย้อนกลับ",@@ -138,8 +141,8 @@"databaseCalendarView": "มุมมองปฏิทินฐานข้อมูล","calendarClearDate": "ล้างวันที่","runtimeInfo": "ข้อมูลสภาพแวดล้อมการทำงาน",- "listMindmapRouteStart": "ลากเพื่อเปลี่ยนโหนดเริ่มต้น",- "listMindmapRouteEnd": "ลากเพื่อเปลี่ยนโหนดปลายทาง",+ "listMindmapRouteStart": "ลากเพื่อย้ายจุดเชื่อมต่อเริ่มต้นหรือเชื่อมต่อกับโหนดอื่น",+ "listMindmapRouteEnd": "ลากเพื่อย้ายจุดเชื่อมต่อปลายทางหรือเชื่อมต่อกับโหนดอื่น","listMindmapRouteHandle": "ลากเพื่อปรับเส้นทาง ดับเบิลคลิกที่จุดควบคุมเพื่อกลับไปคำนวณอัตโนมัติ","listMindmapRouteFallback": "ไม่สามารถใช้เส้นทางที่ปรับไว้ในเค้าโครงนี้ได้ จึงแสดงเส้นทางอัตโนมัติชั่วคราว","decisionModel": "โมเดลการตัดสินใจ",diff --git a/app/appearance/langs/tr.json b/app/appearance/langs/tr.jsonindex 3207305eaf..ed8d280c01 100644--- a/app/appearance/langs/tr.json+++ b/app/appearance/langs/tr.json@@ -1,4 +1,7 @@{+ "listMindmapAnchorReset": "Otomatik bağlantı noktalarını geri yükle",+ "listMindmapAnchorFallback": "Belirtilen bağlantı noktaları bu düzende kullanılamıyor; geçici olarak otomatik bağlantı noktaları gösteriliyor",+ "listMindmapAnchorInvalid": "Bu bağlantı noktasından düğümlerin veya denetimlerin etrafından geçilemiyor; başka bir konum seçin","listMindmapArrowDirection": "Ok yönü","listMindmapArrowForward": "İleri ok","listMindmapArrowReverse": "Ters ok",@@ -138,8 +141,8 @@"databaseCalendarView": "Veritabanı takvim görünümü","calendarClearDate": "Tarihi temizle","runtimeInfo": "Çalışma zamanı bilgileri",- "listMindmapRouteStart": "Başlangıç düğümünü değiştirmek için sürükleyin",- "listMindmapRouteEnd": "Hedef düğümü değiştirmek için sürükleyin",+ "listMindmapRouteStart": "Başlangıç bağlantı noktasını taşımak veya başka bir düğüme bağlanmak için sürükleyin",+ "listMindmapRouteEnd": "Bitiş bağlantı noktasını taşımak veya başka bir düğüme bağlanmak için sürükleyin","listMindmapRouteHandle": "Yolu ayarlamak için sürükleyin; otomatik hesaplamayı geri yüklemek için sürükleme tutamacına çift tıklayın","listMindmapRouteFallback": "Ayarlanan yol bu düzende kullanılamıyor; otomatik yol gösteriliyor","decisionModel": "Karar modeli",diff --git a/app/appearance/langs/uk.json b/app/appearance/langs/uk.jsonindex 922c66a3a4..6182d26d6a 100644--- a/app/appearance/langs/uk.json+++ b/app/appearance/langs/uk.json@@ -1,4 +1,7 @@{+ "listMindmapAnchorReset": "Відновити автоматичні точки з’єднання",+ "listMindmapAnchorFallback": "Задані точки з’єднання недоступні за поточного розташування; тимчасово відображаються автоматичні точки з’єднання",+ "listMindmapAnchorInvalid": "Ця точка з’єднання не дає змоги обійти вузли або елементи керування; виберіть інше положення","listMindmapArrowDirection": "Напрямок стрілки","listMindmapArrowForward": "Пряма стрілка","listMindmapArrowReverse": "Зворотна стрілка",@@ -138,8 +141,8 @@"databaseCalendarView": "Календарне подання бази даних","calendarClearDate": "Очистити дату","runtimeInfo": "Інформація про середовище виконання",- "listMindmapRouteStart": "Перетягніть, щоб змінити початковий вузол",- "listMindmapRouteEnd": "Перетягніть, щоб змінити кінцевий вузол",+ "listMindmapRouteStart": "Перетягніть, щоб перемістити початкову точку з’єднання або підключити інший вузол",+ "listMindmapRouteEnd": "Перетягніть, щоб перемістити кінцеву точку з’єднання або підключити інший вузол","listMindmapRouteHandle": "Перетягніть, щоб змінити шлях; двічі клацніть маркер перетягування, щоб відновити автоматичний розрахунок","listMindmapRouteFallback": "Змінений шлях недоступний у цьому компонуванні; показано автоматичний шлях","decisionModel": "Модель ухвалення рішень",diff --git a/app/appearance/langs/zh-CN.json b/app/appearance/langs/zh-CN.jsonindex 5d065d0151..b0fccd5ab9 100644--- a/app/appearance/langs/zh-CN.json+++ b/app/appearance/langs/zh-CN.json@@ -1,4 +1,7 @@{+ "listMindmapAnchorReset": "恢复自动接入",+ "listMindmapAnchorFallback": "当前布局无法使用指定连接点,暂时显示自动连接点",+ "listMindmapAnchorInvalid": "当前连接点无法避开节点或控件,请调整位置","listMindmapArrowDirection": "箭头方向","listMindmapArrowForward": "正向箭头","listMindmapArrowReverse": "反向箭头",@@ -138,8 +141,8 @@"databaseCalendarView": "数据库 日历视图","calendarClearDate": "清空日期","runtimeInfo": "运行信息",- "listMindmapRouteStart": "拖动更换起始节点",- "listMindmapRouteEnd": "拖动更换目标节点",+ "listMindmapRouteStart": "拖动调整起点连接位置或更换连接节点",+ "listMindmapRouteEnd": "拖动调整终点连接位置或更换连接节点","listMindmapRouteHandle": "拖动调整路径,双击拖拽手柄恢复自动计算","listMindmapRouteFallback": "当前布局无法使用手动路径,暂时显示自动路径","decisionModel": "决策模型",diff --git a/app/appearance/langs/zh-TW.json b/app/appearance/langs/zh-TW.jsonindex ddca7924d8..525f2922cc 100644--- a/app/appearance/langs/zh-TW.json+++ b/app/appearance/langs/zh-TW.json@@ -1,4 +1,7 @@{+ "listMindmapAnchorReset": "恢復自動接入",+ "listMindmapAnchorFallback": "目前配置無法使用指定連接點,暫時顯示自動連接點",+ "listMindmapAnchorInvalid": "目前連接點無法避開節點或控制項,請調整位置","listMindmapArrowDirection": "箭頭方向","listMindmapArrowForward": "正向箭頭","listMindmapArrowReverse": "反向箭頭",@@ -138,8 +141,8 @@"databaseCalendarView": "資料庫 日曆視圖","calendarClearDate": "清空日期","runtimeInfo": "執行資訊",- "listMindmapRouteStart": "拖曳以變更起始節點",- "listMindmapRouteEnd": "拖曳以變更目標節點",+ "listMindmapRouteStart": "拖曳以調整起點連接位置或變更連接節點",+ "listMindmapRouteEnd": "拖曳以調整終點連接位置或變更連接節點","listMindmapRouteHandle": "拖曳調整路徑,按兩下拖曳控制點恢復自動計算","listMindmapRouteFallback": "目前配置無法使用手動路徑,暫時顯示自動路徑","decisionModel": "決策模型",diff --git a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-6yi0dv5/20200924101225-k254i8g.sy b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-6yi0dv5/20200924101225-k254i8g.syindex ee823c9052..205237724f 100644--- a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-6yi0dv5/20200924101225-k254i8g.sy+++ b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-6yi0dv5/20200924101225-k254i8g.sy@@ -6,7 +6,7 @@"id": "20200924101225-k254i8g","title": "Content Block Type","type": "doc",- "updated": "20261001015635"+ "updated": "20261001051950"},"Children": [{@@ -1405,7 +1405,7 @@"HeadingLevel": 2,"Properties": {"id": "20210104091538-a55chyw",- "updated": "20261001015635"+ "updated": "20261001051950"},"Children": [{@@ -2533,7 +2533,7 @@"HeadingLevel": 3,"Properties": {"id": "20260921215916-r1kfene",- "updated": "20261001015635"+ "updated": "20261001051950"},"Children": [{@@ -2643,12 +2643,49 @@"Type": "NodeParagraph","Properties": {"id": "20261001015635-yca6fy3",- "updated": "20261001015635"+ "updated": "20261001051950"+ },+ "Children": [+ {+ "Type": "NodeText",+ "Data": "On a selected relation, the hollow circle marks the start and the filled circle marks the end, regardless of arrow direction. Drag either circle along any of its node’s four edges to position the connection point, or onto another valid node to reconnect. Mouse and touch dragging are supported. Releasing saves one undoable change. Dropping on blank space, an invalid target, the opposite endpoint’s node, or an existing same-direction connection cancels the change. A position that cannot avoid nodes or controls is also rejected. Connection points remain automatic until adjusted; adjusted positions follow the node as its text size or layout changes."+ }+ ]+ },+ {+ "ID": "20261001051950-ow14bv7",+ "Type": "NodeParagraph",+ "Properties": {+ "id": "20261001051950-ow14bv7",+ "updated": "20261001051950"+ },+ "Children": [+ {+ "Type": "NodeText",+ "Data": "In the bottom relation settings, choose "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "kbd",+ "TextMarkTextContent": "Restore automatic connection points"+ },+ {+ "Type": "NodeText",+ "Data": " to reset both connection points while keeping the manually adjusted intermediate path. Double-clicking a path-segment handle resets only the intermediate path and preserves the connection points. Labels, styles, and arrow direction are unchanged."+ }+ ]+ },+ {+ "ID": "20261001051950-ue75z7f",+ "Type": "NodeParagraph",+ "Properties": {+ "id": "20261001051950-ue75z7f",+ "updated": "20261001051950"},"Children": [{"Type": "NodeText",- "Data": "On a selected relation, the hollow circle marks the start and the filled circle marks the end, regardless of arrow direction. Drag a circle to change the connected node. Attachment positions on each node remain automatic."+ "Data": "If a layout change blocks the saved manual path, the line temporarily uses an automatic path while retaining the specified connection points. If those connection points are also unavailable, it temporarily uses automatic connection points. A notice identifies which setting cannot be used. Saved settings are retained and restored when the layout permits. Read-only views and exports use the same drawing rules without adjustment handles; read-only views also show fallback notices."}]},diff --git a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180320-fqgskfj/20200905090211-2vixtlf.sy b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180320-fqgskfj/20200905090211-2vixtlf.syindex c3f0396fac..6974d14d09 100644--- a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180320-fqgskfj/20200905090211-2vixtlf.sy+++ b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180320-fqgskfj/20200905090211-2vixtlf.sy@@ -6,7 +6,7 @@"id": "20200905090211-2vixtlf","title": "内容块类型","type": "doc",- "updated": "20261001015635"+ "updated": "20261001051950"},"Children": [{@@ -1438,7 +1438,7 @@"HeadingLevel": 2,"Properties": {"id": "20210104090624-9qgquxh",- "updated": "20261001015635"+ "updated": "20261001051950"},"Children": [{@@ -2612,7 +2612,7 @@"HeadingLevel": 3,"Properties": {"id": "20260921215916-j34ty5i",- "updated": "20261001015635"+ "updated": "20261001051950"},"Children": [{@@ -2722,12 +2722,49 @@"Type": "NodeParagraph","Properties": {"id": "20261001015635-ls0c0dv",- "updated": "20261001015635"+ "updated": "20261001051950"+ },+ "Children": [+ {+ "Type": "NodeText",+ "Data": "选中关系线后,空心圆表示连接起点,实心圆表示连接终点,与箭头方向无关。沿对应节点的任意一条边拖动圆形手柄,可连续调整连接位置;拖到其他有效节点上则更换连接节点,支持鼠标和触屏操作。松手后保存一次可撤销的修改。落在空白处、无效目标、另一端节点或已有的同向连接上时取消修改;无法避开节点或控件的位置也不会保存。未调整的连接点保持自动选择;已调整的位置会随节点文字尺寸和布局变化而移动。"+ }+ ]+ },+ {+ "ID": "20261001051950-nie1ybs",+ "Type": "NodeParagraph",+ "Properties": {+ "id": "20261001051950-nie1ybs",+ "updated": "20261001051950"+ },+ "Children": [+ {+ "Type": "NodeText",+ "Data": "在关系线底部设置中点击 "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "kbd",+ "TextMarkTextContent": "恢复自动接入"+ },+ {+ "Type": "NodeText",+ "Data": ",可同时恢复两端的自动连接点,并保留手动调整的中间路径。双击线段上的拖拽手柄只恢复自动中间路径,保留连接点设置。关系文字、样式和箭头方向不变。"+ }+ ]+ },+ {+ "ID": "20261001051950-el42cc3",+ "Type": "NodeParagraph",+ "Properties": {+ "id": "20261001051950-el42cc3",+ "updated": "20261001051950"},"Children": [{"Type": "NodeText",- "Data": "选中关系线后,空心圆表示连接起点,实心圆表示连接终点,与箭头方向无关。拖动圆形手柄可以更换对应的连接节点;节点上的具体连接位置仍由系统自动选择。"+ "Data": "布局变化导致已保存的手动路径不可用时,会先保留指定连接点并暂时使用自动路径;指定连接点也不可用时,才暂时使用自动连接点,并提示具体是哪项设置无法使用。已保存的设置不会删除,布局恢复可用后会重新使用。只读视图和导出使用相同的绘制规则,不显示调整手柄;只读视图也会显示回退提示。"}]},diff --git a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226115825-mhcslw2/20211226120147-ib6yy3i.sy b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226115825-mhcslw2/20211226120147-ib6yy3i.syindex cee98781d3..1db0a39f2a 100644--- a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226115825-mhcslw2/20211226120147-ib6yy3i.sy+++ b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226115825-mhcslw2/20211226120147-ib6yy3i.sy@@ -6,7 +6,7 @@"id": "20211226120147-ib6yy3i","title": "內容區塊類型","type": "doc",- "updated": "20261001015635"+ "updated": "20261001051950"},"Children": [{@@ -1434,7 +1434,7 @@"HeadingLevel": 2,"Properties": {"id": "20211226120227-esm6f20",- "updated": "20261001015635"+ "updated": "20261001051950"},"Children": [{@@ -2548,7 +2548,7 @@"HeadingLevel": 3,"Properties": {"id": "20260921215916-cfx2ewc",- "updated": "20261001015635"+ "updated": "20261001051950"},"Children": [{@@ -2658,12 +2658,49 @@"Type": "NodeParagraph","Properties": {"id": "20261001015635-wjlw51s",- "updated": "20261001015635"+ "updated": "20261001051950"+ },+ "Children": [+ {+ "Type": "NodeText",+ "Data": "選取關係線後,空心圓表示連接起點,實心圓表示連接終點,與箭頭方向無關。沿對應節點的任一邊緣拖曳圓形控制點,可連續調整連接位置;拖到其他有效節點上則變更連接節點,支援滑鼠與觸控操作。放開後儲存一次可復原的修改。落在空白處、無效目標、另一端節點或既有的同向連線上時取消修改;無法避開節點或控制項的位置也不會儲存。未調整的連接點維持自動選擇;已調整的位置會隨節點文字尺寸與配置變化而移動。"+ }+ ]+ },+ {+ "ID": "20261001051950-o2ih74q",+ "Type": "NodeParagraph",+ "Properties": {+ "id": "20261001051950-o2ih74q",+ "updated": "20261001051950"+ },+ "Children": [+ {+ "Type": "NodeText",+ "Data": "在關係線底部設定中點選 "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "kbd",+ "TextMarkTextContent": "恢復自動接入"+ },+ {+ "Type": "NodeText",+ "Data": ",可同時恢復兩端的自動連接點,並保留手動調整的中間路徑。按兩下線段上的拖曳控制點,只會恢復自動中間路徑,保留連接點設定。關係文字、樣式與箭頭方向不變。"+ }+ ]+ },+ {+ "ID": "20261001051950-myqk0fn",+ "Type": "NodeParagraph",+ "Properties": {+ "id": "20261001051950-myqk0fn",+ "updated": "20261001051950"},"Children": [{"Type": "NodeText",- "Data": "選取關係線後,空心圓表示連接起點,實心圓表示連接終點,與箭頭方向無關。拖曳圓形控制點可以變更對應的連接節點;節點上的具體連接位置仍由系統自動選擇。"+ "Data": "配置變化導致已儲存的手動路徑無法使用時,會先保留指定連接點並暫時使用自動路徑;指定連接點也無法使用時,才暫時使用自動連接點,並提示具體是哪項設定無法使用。已儲存的設定不會刪除,配置恢復可用後會重新使用。唯讀視圖與匯出使用相同的繪製規則,不顯示調整控制點;唯讀視圖也會顯示回退提示。"}]},diff --git a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-gvtksyj/20240530101000-35bbvcx.sy b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-gvtksyj/20240530101000-35bbvcx.syindex 30fa75ade5..45229c3eb1 100644--- a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-gvtksyj/20240530101000-35bbvcx.sy+++ b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-gvtksyj/20240530101000-35bbvcx.sy@@ -7,7 +7,7 @@"id": "20240530101000-35bbvcx","title": "コンテンツブロックの種類","type": "doc",- "updated": "20261001015635"+ "updated": "20261001051950"},"Children": [{@@ -1491,7 +1491,7 @@"Properties": {"ID": "20240530101000-rjjxxn8","id": "20240530101000-p035stn",- "updated": "20261001015635"+ "updated": "20261001051950"},"Children": [{@@ -2699,7 +2699,7 @@"HeadingLevel": 3,"Properties": {"id": "20260921215916-odykie5",- "updated": "20261001015635"+ "updated": "20261001051950"},"Children": [{@@ -2809,12 +2809,49 @@"Type": "NodeParagraph","Properties": {"id": "20261001015635-wnnepvh",- "updated": "20261001015635"+ "updated": "20261001051950"+ },+ "Children": [+ {+ "Type": "NodeText",+ "Data": "関連線を選択すると、矢印の方向にかかわらず、白抜きの円は接続の始点、塗りつぶした円は終点を示します。円形のハンドルを元のノードの四辺に沿ってドラッグすると、接続位置を連続的に調整できます。接続可能な別のノードにドラッグすると、接続先が変わります。マウスとタッチ操作に対応し、離すと元に戻せる一回の変更として保存されます。空白、無効な対象、反対側の端点のノード、既存の同方向の接続にドロップすると変更は取り消されます。ノードや操作ボタンを避けられない位置も保存されません。接続位置は調整するまで自動で選択され、調整後はノードの文字サイズやレイアウトの変化に追従します。"+ }+ ]+ },+ {+ "ID": "20261001051950-1qxr826",+ "Type": "NodeParagraph",+ "Properties": {+ "id": "20261001051950-1qxr826",+ "updated": "20261001051950"+ },+ "Children": [+ {+ "Type": "NodeText",+ "Data": "関連線の下部設定で "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "kbd",+ "TextMarkTextContent": "接続位置を自動に戻す"+ },+ {+ "Type": "NodeText",+ "Data": " を選ぶと、手動で調整した中間経路を保持したまま、両端の接続位置を自動に戻せます。線分のハンドルをダブルクリックすると、中間経路だけが自動に戻り、接続位置の設定は保持されます。ラベル、スタイル、矢印の方向は変わりません。"+ }+ ]+ },+ {+ "ID": "20261001051950-6lon1fd",+ "Type": "NodeParagraph",+ "Properties": {+ "id": "20261001051950-6lon1fd",+ "updated": "20261001051950"},"Children": [{"Type": "NodeText",- "Data": "関連線を選択すると、矢印の方向にかかわらず、白抜きの円は接続の始点、塗りつぶした円は終点を示します。円形のハンドルをドラッグすると、接続先のノードを変更できます。各ノード上の具体的な接続位置は自動的に選択されます。"+ "Data": "レイアウトの変化で保存済みの手動経路を使えなくなった場合は、指定した接続位置を保持し、一時的に自動経路を使用します。指定した接続位置も使えない場合に限り、自動の接続位置を一時的に使用します。どの設定を使用できないかは通知で確認できます。保存済みの設定は削除されず、レイアウトが対応すれば再び使用されます。読み取り専用表示とエクスポートでも同じ描画規則を使い、調整ハンドルは表示しません。読み取り専用表示でも自動への切り替え通知を表示します。"}]},diff --git a/app/src/assets/scss/protyle/_mindmap-view.scss b/app/src/assets/scss/protyle/_mindmap-view.scssindex 958c07a046..af56f05b9d 100644--- a/app/src/assets/scss/protyle/_mindmap-view.scss+++ b/app/src/assets/scss/protyle/_mindmap-view.scss@@ -871,6 +871,11 @@}@media (any-pointer: coarse) {+ .mindmap-view__route-endpoint {+ width: 28px;+ height: 28px;+ }+// 脑图把手位于边框内,不沿用外层弹窗向外扩展的触摸定位。.mindmap-view > .mindmap-view__resize {opacity: 1;diff --git a/app/src/protyle/render/listMindmap/anchors.test.ts b/app/src/protyle/render/listMindmap/anchors.test.tsnew file mode 100644index 0000000000..37e456b036--- /dev/null+++ b/app/src/protyle/render/listMindmap/anchors.test.ts@@ -0,0 +1,197 @@+import * as assert from "node:assert/strict";+import test from "node:test";+import {encodeMindmapRoute, getMindmapRelationAnchorPoint, MindmapRelationAnchor, MindmapRouteBox, MindmapRoutePoint,+ projectMindmapRelationAnchor, routeManualMindmapRelation, routeMindmapRelation} from "./routing";++const buildGlobals = ["SIYUAN_VERSION", "NODE_ENV"].map(name => ({+ name, descriptor: Object.getOwnPropertyDescriptor(globalThis, name),+}));+buildGlobals.forEach(({name}) => Object.defineProperty(globalThis, name, {configurable: true, value: "test"}));+const {parseListMindmapMetadata}: typeof import("./model") = require("./model");+buildGlobals.forEach(({name, descriptor}) => {+ if (descriptor) {+ Object.defineProperty(globalThis, name, descriptor);+ } else {+ Reflect.deleteProperty(globalThis, name);+ }+});++const sides: MindmapRelationAnchor["side"][] = ["left", "right", "top", "bottom"];+const validate = (route: MindmapRoutePoint[], nodes: MindmapRouteBox[]) => {+ assert.ok(route.length >= 2, "a route must exist");+ for (let i = 1; i < route.length; i++) {+ const a = route[i - 1];+ const b = route[i];+ assert.ok(a.x === b.x || a.y === b.y, "segments are orthogonal");+ for (const node of nodes) {+ for (const box of [node, {x: node.x + node.width - 19,+ y: (node.controlY ?? node.y + node.height) - 15, width: 80, height: 30}]) {+ const intersects = a.x === b.x ? a.x > box.x && a.x < box.x + box.width &&+ Math.max(a.y, b.y) > box.y && Math.min(a.y, b.y) < box.y + box.height :+ a.y > box.y && a.y < box.y + box.height &&+ Math.max(a.x, b.x) > box.x && Math.min(a.x, b.x) < box.x + box.width;+ assert.equal(intersects, false, "route avoids nodes and their controls");+ }+ }+ }+};++const validateAnchor = (route: MindmapRoutePoint[], node: MindmapRouteBox, anchor: MindmapRelationAnchor) => {+ assert.deepEqual(route[0], getMindmapRelationAnchorPoint(node, anchor, 3));+ const [point, next] = route;+ assert.ok(anchor.side === "left" ? next.x < point.x && next.y === point.y :+ anchor.side === "right" ? next.x > point.x && next.y === point.y :+ anchor.side === "top" ? next.y < point.y && next.x === point.x :+ next.y > point.y && next.x === point.x, "anchor retains its outward normal");+};++test("anchor projection is continuous along four edges and clamps beyond corners", () => {+ const node = {x: 20, y: 40, width: 160, height: 80};+ for (const side of sides) {+ for (const ratio of [0, .137, .5, .923, 1]) {+ const anchor = {side, ratio};+ const point = getMindmapRelationAnchorPoint(node, anchor, 17);+ assert.deepEqual(projectMindmapRelationAnchor(node, point, anchor), anchor);+ assert.deepEqual(projectMindmapRelationAnchor(node, getMindmapRelationAnchorPoint(node, anchor), anchor), anchor);+ }+ }+ assert.deepEqual(projectMindmapRelationAnchor(node, {x: -100, y: -100}, {side: "top", ratio: .5}),+ {side: "top", ratio: 0});+ assert.deepEqual(projectMindmapRelationAnchor(node, {x: -100, y: -100}, {side: "left", ratio: .5}),+ {side: "left", ratio: 0});+ assert.deepEqual(projectMindmapRelationAnchor(node, {x: 200, y: 150}, {side: "bottom", ratio: .5}),+ {side: "bottom", ratio: 1});+ assert.deepEqual(projectMindmapRelationAnchor(node, {x: 60, y: 80}, {side: "left", ratio: .5}),+ {side: "left", ratio: .5}, "interior ties retain the previous side");+});++test("fixed anchors cover every edge, including corners, and reverse with their endpoint boxes", () => {+ const nodes = [{x: 0, y: 0, width: 100, height: 80, controlY: -1000},+ {x: 320, y: 220, width: 120, height: 60, controlY: -1000}];+ for (const fromSide of sides) {+ for (const toSide of sides) {+ for (const ratio of [0, .137, .5, .923, 1]) {+ const fromAnchor = {side: fromSide, ratio};+ const toAnchor = {side: toSide, ratio: 1 - ratio};+ const anchors = {fromAnchor, toAnchor};+ const route = routeMindmapRelation(nodes[0], nodes[1], nodes, 12, anchors);+ validate(route, nodes);+ validateAnchor(route, nodes[0], fromAnchor);+ validateAnchor([...route].reverse(), nodes[1], toAnchor);+ assert.deepEqual(routeMindmapRelation(nodes[1], nodes[0], nodes, 12,+ {fromAnchor: toAnchor, toAnchor: fromAnchor}), [...route].reverse());+ }+ }+ }+});++test("one fixed endpoint preserves automatic choice at the other and exact pointer previews", () => {+ const nodes = [{x: 0, y: 0, width: 100, height: 80}, {x: 320, y: 220, width: 120, height: 60}];+ const fromAnchor: MindmapRelationAnchor = {side: "left", ratio: .73};+ const route = routeMindmapRelation(nodes[0], nodes[1], nodes, 12, {fromAnchor});+ validate(route, nodes);+ validateAnchor(route, nodes[0], fromAnchor);+ const toAnchor: MindmapRelationAnchor = {side: "top", ratio: .27};+ const endOnly = routeMindmapRelation(nodes[0], nodes[1], nodes, 12, {toAnchor});+ validate(endOnly, nodes);+ validateAnchor([...endOnly].reverse(), nodes[1], toAnchor);+ const pointer = {x: 280, y: -120, width: 0, height: 0};+ const preview = routeMindmapRelation(nodes[0], pointer, nodes, 12, {fromAnchor});+ validate(preview, nodes);+ validateAnchor(preview, nodes[0], fromAnchor);+ assert.deepEqual(preview[preview.length - 1], {x: pointer.x, y: pointer.y});+});++test("anchors translate and resize proportionally without changing their stored ratios", () => {+ const nodes = [{x: 0, y: 0, width: 100, height: 80}, {x: 320, y: 220, width: 120, height: 60}];+ const anchors = {fromAnchor: {side: "left", ratio: .37}, toAnchor: {side: "top", ratio: .63}} as const;+ const snapshot = JSON.stringify(anchors);+ const route = routeMindmapRelation(nodes[0], nodes[1], nodes, 12, anchors);+ const translated = nodes.map(node => ({...node, x: node.x + 157, y: node.y - 83}));+ const moved = routeMindmapRelation(translated[0], translated[1], translated, 12, anchors);+ assert.equal(moved.length, route.length);+ moved.forEach((point, index) => {+ assert.ok(Math.abs(point.x - route[index].x - 157) < 1e-6);+ assert.ok(Math.abs(point.y - route[index].y + 83) < 1e-6);+ });+ const resized = [{...nodes[0], width: 210, height: 160}, {...nodes[1], width: 240, height: 120}];+ const next = routeMindmapRelation(resized[0], resized[1], resized, 12, anchors);+ validate(next, resized);+ validateAnchor(next, resized[0], anchors.fromAnchor);+ validateAnchor([...next].reverse(), resized[1], anchors.toAnchor);+ assert.equal(JSON.stringify(anchors), snapshot);+});++test("strict anchors reject control and node collisions including the attachment escape gap", () => {+ const from = {x: 0, y: 0, width: 100, height: 80, controlY: 11};+ const to = {x: 320, y: -180, width: 100, height: 80};+ const fromAnchor: MindmapRelationAnchor = {side: "top", ratio: .9};+ const nodes = [from, to];+ assert.ok(routeMindmapRelation(from, to, nodes).length, "automatic ports can avoid the blocked attachment");+ assert.deepEqual(routeMindmapRelation(from, to, nodes, 12, {fromAnchor}), [],+ "the search port is outside controls but the final 3px attachment is inside");+ assert.deepEqual(routeMindmapRelation(to, from, nodes, 12, {toAnchor: fromAnchor}), []);+ const borderBlocked = {...from, controlY: 14};+ assert.deepEqual(routeMindmapRelation(borderBlocked, to, [borderBlocked, to], 12, {fromAnchor}), [],+ "the node-border-to-attachment gap also must be clear");+ const clear = {...from, controlY: 80};+ const blocker = {x: 89, y: -2, width: 2, height: 1, controlY: -1000};+ assert.deepEqual(routeMindmapRelation(clear, to, [clear, to, blocker], 12, {fromAnchor}), []);+ assert.deepEqual(routeMindmapRelation(clear, to, [clear, to], 12,+ {fromAnchor: {side: "bottom", ratio: 1}}), [], "bottom-right corner intersects the node controls");+ const restored = routeMindmapRelation(clear, to, [clear, to], 12, {fromAnchor});+ validate(restored, [clear, to]);+ validateAnchor(restored, clear, fromAnchor);+});++test("manual routing constrains only the endpoints and retains their outward normals", () => {+ const nodes = [{x: 0, y: 0, width: 100, height: 80}, {x: 320, y: 220, width: 120, height: 60}];+ const anchors = {fromAnchor: {side: "left", ratio: .3}, toAnchor: {side: "top", ratio: .4}} as const;+ const points = [getMindmapRelationAnchorPoint(nodes[0], anchors.fromAnchor, 3),+ {x: -60, y: 24}, {x: -60, y: -90}, {x: 368, y: -90},+ getMindmapRelationAnchorPoint(nodes[1], anchors.toAnchor, 3)];+ const saved = encodeMindmapRoute(points, nodes[0], nodes[1]);+ const snapshot = JSON.stringify(saved);+ const route = routeManualMindmapRelation(nodes[0], nodes[1], nodes, saved, anchors);+ validate(route, nodes);+ validateAnchor(route, nodes[0], anchors.fromAnchor);+ validateAnchor([...route].reverse(), nodes[1], anchors.toAnchor);+ assert.ok(route.some(point => point.y === -90));+ const translated = nodes.map(node => ({...node, x: node.x + 50, y: node.y + 90}));+ const moved = routeManualMindmapRelation(translated[0], translated[1], translated, saved, anchors);+ validate(moved, translated);+ validateAnchor(moved, translated[0], anchors.fromAnchor);+ validateAnchor([...moved].reverse(), translated[1], anchors.toAnchor);+ const resized = [{...nodes[0], height: 120}, {...nodes[1], width: 200}];+ const next = routeManualMindmapRelation(resized[0], resized[1], resized, saved, anchors);+ validate(next, resized);+ validateAnchor(next, resized[0], anchors.fromAnchor);+ validateAnchor([...next].reverse(), resized[1], anchors.toAnchor);+ const blocker = {x: -65, y: -95, width: 10, height: 10};+ assert.deepEqual(routeManualMindmapRelation(nodes[0], nodes[1], [...nodes, blocker], saved, anchors), []);+ assert.equal(JSON.stringify(saved), snapshot, "failed routing does not modify saved constraints");+});++test("optional relation anchors preserve extension fields and reject malformed metadata", () => {+ const base = {version: 1, nodes: {}, relations: [{id: "r", from: "a", to: "b", label: ""}]};+ const original = JSON.stringify(base);+ assert.equal(JSON.stringify(parseListMindmapMetadata(original)), original);+ for (const key of ["fromAnchor", "toAnchor"]) {+ for (const side of sides) {+ for (const ratio of [0, .317, 1]) {+ const value = JSON.stringify({...base, relations: [{...base.relations[0],+ [key]: {side, ratio, extension: {keep: true}}}]});+ assert.equal(JSON.stringify(parseListMindmapMetadata(value)), value);+ }+ }+ for (const anchor of [null, [], {}, "left", {side: "center", ratio: .5}, {side: ["left"], ratio: .5},+ {side: "left"}, {ratio: .5}, {side: "left", ratio: null}, {side: "left", ratio: "0.5"},+ {side: "left", ratio: -.001}, {side: "left", ratio: 1.001}]) {+ const value = JSON.stringify({...base, relations: [{...base.relations[0], [key]: anchor}]});+ assert.throws(() => parseListMindmapMetadata(value), /Invalid list mindmap metadata/);+ }+ const infinite = '{"version":1,"nodes":{},"relations":[{"id":"r","from":"a","to":"b","label":"",' ++ '"' + key + '":{"side":"left","ratio":1e999}}]}';+ assert.throws(() => parseListMindmapMetadata(infinite), /Invalid list mindmap metadata/);+ }+});diff --git a/app/src/protyle/render/listMindmap/anchorsView.test.ts b/app/src/protyle/render/listMindmap/anchorsView.test.tsnew file mode 100644index 0000000000..0be06df745--- /dev/null+++ b/app/src/protyle/render/listMindmap/anchorsView.test.ts@@ -0,0 +1,211 @@+import * as assert from "node:assert/strict";+import {readFileSync} from "node:fs";+import test from "node:test";+import {runInNewContext} from "node:vm";+import {createSourceFile, isClassDeclaration, ScriptTarget, transpileModule} from "typescript";+import * as routing from "./routing";+import type {ListMindmapRelation} from "./model";++// 执行视图实际的拖动和回退方法,指针及元素替身只提供浏览器事件边界。+const source = createSourceFile("view.ts", readFileSync("src/protyle/render/listMindmap/view.ts", "utf8"),+ ScriptTarget.ES2021, true);+const declaration = source.statements.find(item => isClassDeclaration(item) && item.name?.text === "ListMindmapView");+assert.ok(declaration && isClassDeclaration(declaration));+const names = ["resolveRelationRoute", "calculateRelationRoute", "previewRouteDrag", "canReconnectRelation",+ "pointerMove", "pointerUp", "cancelPointer", "resetRelationAnchors", "resetRelationRoute", "renderRouteControls"];+const methods = declaration.members.filter(item => names.includes(item.name?.getText(source)));+assert.equal(methods.length, names.length);+const compiled = transpileModule(`class View { ${methods.map(item => item.getText(source)).join("\n")} }+globalThis.View = View;`, {compilerOptions: {target: ScriptTarget.ES2021}}).outputText;++const setup = (overrides: Partial<ListMindmapRelation> = {}) => {+ const relation: ListMindmapRelation = {id: "r", from: "a", to: "b", label: "Keep", arrowDirection: "reverse", ...overrides};+ const changes: {id: string, patch: Partial<ListMindmapRelation>, expected: string}[] = [];+ const sandbox: any = {...routing, cancelAnimationFrame: () => {}, requestAnimationFrame: () => 1};+ runInNewContext(compiled, sandbox);+ const view = new sandbox.View();+ const positions = new Map([+ ["a", {id: "a", x: 0, y: 0, width: 100, height: 40}],+ ["b", {id: "b", x: 300, y: 120, width: 100, height: 40}],+ ["c", {id: "c", x: 300, y: 240, width: 100, height: 40}],+ ]);+ const classList = () => ({toggle: () => {}, remove: () => {}});+ Object.assign(view, {+ model: {metadata: {relations: [relation]}, nodes: new Map([...positions.keys()].map(id => [id, {id}]))},+ positions, relationRoutes: new Map(), fallbackRoutes: new Set(), anchorFallbackRoutes: new Set(),+ nodeElements: new Map([...positions.keys()].map(id => [id, {classList: classList()}])),+ scale: 1, offsetX: 0, offsetY: 0, selectedRelation: "r", routeDragFrame: 0,+ viewport: {classList: classList(), getBoundingClientRect: () => ({left: 0, top: 0})},+ options: {onRelationChange: (id: string, patch: Partial<ListMindmapRelation>, expected: string) =>+ changes.push({id, patch, expected})},+ routingObstacles: () => [...positions.values()], draw: () => {}, refreshLayout: () => {},+ clearDrop: () => {}, setHoveredLine: () => {}, finishThen: (action: () => void) => action(),+ routeHandles: new Map(), routeStatus: {}, label: (key: string) => key,+ getRouteHandle: () => ({style: {}}),+ });+ view.relationRoutes.set("r", view.calculateRelationRoute(relation, positions.get("a"), positions.get("b")));+ const begin = (endpoint: "from" | "to" = "from") => {+ const points = view.relationRoutes.get("r");+ const handle = points[endpoint === "from" ? 0 : points.length - 1];+ view.pointer = {pointerId: 1, startX: handle.x * view.scale, startY: handle.y * view.scale, moved: false,+ relation: {id: "r", endpoint, segment: 0, original: JSON.stringify(relation), points,+ offset: 0, valid: true, targetId: relation[endpoint], handle}};+ };+ const event = (x: number, y: number, pointerType = "mouse") => ({pointerId: 1,+ clientX: x * view.scale, clientY: y * view.scale, pointerType, preventDefault: () => {}});+ return {view, relation, positions, changes, begin, event};+};++test("same-node endpoint drag pins a continuous position and preserves route and arrow identity", () => {+ for (const scale of [.5, 1, 2]) {+ const {view, relation, changes, begin, event} = setup();+ view.scale = scale;+ const original = JSON.stringify(relation);+ begin();+ view.pointerMove(event(27, -2));+ view.previewRouteDrag();+ assert.equal(view.pointer.relation.valid, true);+ assert.deepEqual(JSON.parse(JSON.stringify(view.pointer.relation.anchor)), {side: "top", ratio: .27});+ assert.equal(changes.length, 0);+ view.pointerUp(event(27, -2));+ assert.deepEqual(JSON.parse(JSON.stringify(changes)), [{id: "r", patch: {fromAnchor: {side: "top", ratio: .27}}, expected: original}]);+ assert.equal(JSON.stringify(relation), original, "preview never writes the model");+ assert.equal(view.pointer, undefined);+ }+});++test("reconnection clears only the moved anchor and route while retaining the other endpoint", () => {+ const {view, relation, changes, begin, event} = setup({+ fromAnchor: {side: "top", ratio: .25}, toAnchor: {side: "left", ratio: .3},+ });+ begin();+ view.pointerMove(event(340, 250));+ view.pointerUp(event(340, 250));+ assert.equal(changes.length, 1);+ assert.equal(changes[0].patch.from, "c");+ assert.ok("fromAnchor" in changes[0].patch);+ assert.equal(changes[0].patch.fromAnchor, undefined);+ assert.ok("route" in changes[0].patch);+ assert.ok(!("toAnchor" in changes[0].patch));+ assert.deepEqual(relation.toAnchor, {side: "left", ratio: .3});+});++test("moving an existing anchor preserves its unknown extension fields", () => {+ const {view, changes, begin, event} = setup({fromAnchor: Object.assign({side: "top" as const, ratio: .2},+ {extension: {keep: true}})});+ begin();+ view.pointerMove(event(37, -2));+ view.pointerUp(event(37, -2));+ assert.deepEqual(JSON.parse(JSON.stringify(changes[0].patch.fromAnchor)),+ {side: "top", ratio: .37, extension: {keep: true}});+});++test("dragging through blank space retains the opposite fixed connection in the preview", () => {+ const {view, changes, begin, event} = setup({toAnchor: {side: "top", ratio: .25}});+ begin();+ view.pointerMove(event(180, -100));+ view.previewRouteDrag();+ assert.equal(view.pointer.relation.valid, false);+ const points = view.relationRoutes.get("r");+ assert.deepEqual(points[points.length - 1], {x: 325, y: 117});+ view.pointerUp(event(180, -100));+ assert.equal(changes.length, 0);+});++test("blank drops, blocked new anchors, cancellation and a stale missing relation never save", () => {+ for (const action of ["blank", "blocked", "cancel", "deleted"]) {+ const {view, changes, begin, event} = setup();+ begin();+ // 右下角的折叠和添加按钮属于接入点的避让区域。+ const point = action === "blank" ? [180, 300] : action === "blocked" ? [100, 39] : [25, -2];+ view.pointerMove(event(point[0], point[1]));+ if (action === "cancel") {+ view.cancelPointer();+ } else if (action === "deleted") {+ view.model.metadata.relations = [];+ } else {+ view.previewRouteDrag();+ assert.equal(view.pointer.relation.valid, false);+ }+ view.pointerUp(event(point[0], point[1]));+ assert.equal(changes.length, 0, action);+ }+});++test("existing opposite anchor constraints are not silently discarded during a new drag", () => {+ const {view, changes, begin, event} = setup({toAnchor: {side: "right", ratio: .99}});+ assert.equal(view.anchorFallbackRoutes.has("r"), true);+ begin();+ view.pointerMove(event(25, -2));+ view.previewRouteDrag();+ assert.equal(view.pointer.relation.valid, false);+ view.renderRouteControls();+ assert.equal(view.routeStatus.textContent, "listMindmapAnchorInvalid");+ view.pointerUp(event(25, -2));+ assert.equal(changes.length, 0);+});++test("temporary anchor fallback is visible in readonly views and restores without rewriting metadata", () => {+ const {view, relation, positions} = setup({fromAnchor: {side: "top", ratio: .25}});+ const original = JSON.stringify(relation);+ const from = positions.get("a");+ const to = positions.get("b");+ const saved = view.calculateRelationRoute(relation, from, to);+ assert.equal(saved[0].x, 25);+ const blocker = {id: "blocker", x: 15, y: -30, width: 20, height: 25};+ positions.set("blocker", blocker);+ const fallback = view.calculateRelationRoute(relation, from, to);+ assert.ok(fallback.length >= 2);+ assert.equal(view.anchorFallbackRoutes.has("r"), true);+ view.readOnly = true;+ view.selectedRelation = undefined;+ view.renderRouteControls();+ assert.equal(view.routeStatus.hidden, false);+ assert.equal(view.routeStatus.textContent, "listMindmapAnchorFallback");+ view.options.printLayout = true;+ view.renderRouteControls();+ assert.equal(view.routeStatus.hidden, true);+ assert.deepEqual(view.calculateRelationRoute(relation, from, to), fallback, "printing changes only controls, not routing");+ positions.delete("blocker");+ assert.deepEqual(view.calculateRelationRoute(relation, from, to), saved);+ assert.equal(view.anchorFallbackRoutes.has("r"), false);+ assert.equal(JSON.stringify(relation), original);+});++test("manual-route fallback preserves viable anchor positions and reset actions remain separate", () => {+ const route = {version: 1 as const, points: [{x: 0, y: 0, t: 0}]};+ const {view, relation, positions, changes} = setup({route, fromAnchor: {side: "top", ratio: .25}});+ const result = view.calculateRelationRoute(relation, positions.get("a"), positions.get("b"));+ assert.equal(view.fallbackRoutes.has("r"), true, "a control inside the source cannot be routed");+ assert.equal(view.anchorFallbackRoutes.has("r"), false);+ assert.equal(result[0].x, 25);+ assert.equal(result[0].y, -3);+ view.resetRelationAnchors("r");+ assert.equal(changes.length, 1);+ assert.deepEqual(Object.keys(changes[0].patch), ["fromAnchor", "toAnchor"]);+ assert.equal(changes[0].expected, JSON.stringify(relation));+ view.resetRelationRoute("r");+ assert.deepEqual(Object.keys(changes[1].patch), ["route"]);+ view.readOnly = true;+ view.resetRelationAnchors("r");+ assert.equal(changes.length, 2);+});++test("touch edge tolerance uses screen pixels and actual neighbor hits win over source proximity", () => {+ const {view, positions, begin, event} = setup();+ view.scale = .5;+ positions.set("c", {id: "c", x: 110, y: -20, width: 100, height: 40});+ begin();+ view.pointerMove(event(115, 0, "touch"));+ assert.equal(view.pointer.relation.targetId, "c");+ assert.equal(view.pointer.relation.anchor, undefined);+ view.cancelPointer();+ begin();+ view.pointerMove(event(25, -25, "touch"));+ assert.equal(view.pointer.relation.targetId, "a");+ assert.equal(view.pointer.relation.anchor.side, "top");+ view.cancelPointer();+ begin();+ view.pointerMove(event(25, -25));+ assert.equal(view.pointer.relation.targetId, undefined, "mouse tolerance stays eight screen pixels");+});diff --git a/app/src/protyle/render/listMindmap/index.ts b/app/src/protyle/render/listMindmap/index.tsindex 80d027730e..0e0644b914 100644--- a/app/src/protyle/render/listMindmap/index.ts+++ b/app/src/protyle/render/listMindmap/index.ts@@ -363,8 +363,10 @@ class ListMindmapController {}}Object.assign(relation, patch);- if ("route" in patch && patch.route === undefined) {- delete relation.route;+ for (const key of ["route", "fromAnchor", "toAnchor"] as const) {+ if (key in patch && patch[key] === undefined) {+ delete relation[key];+ }}}),onRelationDelete: id => this.metadata(metadata => {diff --git a/app/src/protyle/render/listMindmap/model.ts b/app/src/protyle/render/listMindmap/model.tsindex c3fd4f44ae..94a92754c6 100644--- a/app/src/protyle/render/listMindmap/model.ts+++ b/app/src/protyle/render/listMindmap/model.ts@@ -1,6 +1,6 @@import {Constants} from "../../../constants";import {getOrderedListMarkerUpdates} from "../../wysiwyg/listContext";-import type {MindmapManualRoute} from "./routing";+import type {MindmapManualRoute, MindmapRelationAnchor} from "./routing";import {getListMindmapSiblingIDs, normalizeListMindmapSummaries} from "./summary";import type {ListMindmapSummary} from "./summary";@@ -28,6 +28,8 @@ export interface ListMindmapRelation {dash?: boolean;arrowDirection?: "forward" | "reverse" | "both" | "none";route?: MindmapManualRoute;+ fromAnchor?: MindmapRelationAnchor;+ toAnchor?: MindmapRelationAnchor;}export interface ListMindmapMetadata {@@ -126,6 +128,16 @@ export const parseListMindmapMetadata = (value: string | null): ListMindmapMetad!["forward", "reverse", "both", "none"].includes(relation.arrowDirection)))) {throw invalidMetadata();}+ for (const key of ["fromAnchor", "toAnchor"]) {+ if (key in relation) {+ const anchor = relation[key];+ if (!isRecord(anchor) || typeof anchor.side !== "string" ||+ !["left", "right", "top", "bottom"].includes(anchor.side) ||+ typeof anchor.ratio !== "number" || !Number.isFinite(anchor.ratio) || anchor.ratio < 0 || anchor.ratio > 1) {+ throw invalidMetadata();+ }+ }+ }if ("route" in relation) {const route = relation.route;if (!isRecord(route) || route.version !== 1 || !Array.isArray(route.points) ||diff --git a/app/src/protyle/render/listMindmap/relation.test.ts b/app/src/protyle/render/listMindmap/relation.test.tsindex 1f2b9d67bf..e32300c954 100644--- a/app/src/protyle/render/listMindmap/relation.test.ts+++ b/app/src/protyle/render/listMindmap/relation.test.ts@@ -101,4 +101,27 @@ test("manual route save and reset use one transaction and reject stale relationtarget.onRelationChange("r", {arrowDirection});assert.equal(transactions.length, count, "choosing the current direction is a no-op");}+ data = JSON.parse(saved);+ const anchor = {side: "top", ratio: .27};+ const beforeAnchor = JSON.stringify(data);+ target.onRelationChange("r", {fromAnchor: anchor}, JSON.stringify(data.relations[0]));+ const anchored = transactions[transactions.length - 1];+ assert.equal(anchored.before, beforeAnchor);+ assert.deepEqual(JSON.parse(anchored.after).relations[0], {...JSON.parse(beforeAnchor).relations[0], fromAnchor: anchor});+ data = JSON.parse(anchored.before);+ assert.equal(JSON.stringify(data), beforeAnchor, "undo restores automatic attachment");+ data = JSON.parse(anchored.after);+ target.onRelationChange("r", {fromAnchor: undefined, toAnchor: undefined}, JSON.stringify(data.relations[0]));+ assert.equal(transactions[transactions.length - 1].after, beforeAnchor, "anchor reset preserves the manual path");+ data = JSON.parse(anchored.after);+ const anchorSnapshot = JSON.stringify(data.relations[0]);+ const count = transactions.length;+ data.relations[0].label = "New remote label";+ target.onRelationChange("r", {fromAnchor: {side: "left", ratio: .4}}, anchorSnapshot);+ assert.equal(transactions.length, count, "stale anchor drags cannot replace remote updates");+ assert.equal(messages.pop(), "stale");+ data = JSON.parse(anchored.after);+ target.onRelationChange("r", {from: "c", route: undefined, fromAnchor: undefined}, JSON.stringify(data.relations[0]));+ assert.deepEqual(JSON.parse(transactions[transactions.length - 1].after).relations[0],+ {id: "r", from: "c", to: "b", label: "Keep", color: "red"});});diff --git a/app/src/protyle/render/listMindmap/routing.ts b/app/src/protyle/render/listMindmap/routing.tsindex ccd9274e66..408ee34138 100644--- a/app/src/protyle/render/listMindmap/routing.ts+++ b/app/src/protyle/render/listMindmap/routing.ts@@ -1,5 +1,13 @@export interface MindmapRoutePoint {x: number; y: number;}export interface MindmapRouteBox extends MindmapRoutePoint {width: number; height: number; controlY?: number;}+export interface MindmapRelationAnchor {+ side: "left" | "right" | "top" | "bottom";+ ratio: number;+}+export interface MindmapRelationAnchors {+ fromAnchor?: MindmapRelationAnchor;+ toAnchor?: MindmapRelationAnchor;+}export interface MindmapManualRoute {version: 1;points: (MindmapRoutePoint & {t: number})[];@@ -7,17 +15,83 @@ export interface MindmapManualRoute {const bendCost = 24;+export const getMindmapRelationAnchorPoint = (node: MindmapRouteBox, anchor: MindmapRelationAnchor,+ gap = 0): MindmapRoutePoint => {+ if (anchor.side === "left" || anchor.side === "right") {+ return {x: node.x + (anchor.side === "left" ? -gap : node.width + gap),+ y: node.y + node.height * anchor.ratio};+ }+ return {x: node.x + node.width * anchor.ratio,+ y: node.y + (anchor.side === "top" ? -gap : node.height + gap)};+};++// 将指针投影到矩形边缘;角点等距时沿用原边,避免拖动时来回跳动。+export const projectMindmapRelationAnchor = (node: MindmapRouteBox, point: MindmapRoutePoint,+ previous?: MindmapRelationAnchor): MindmapRelationAnchor => {+ const clamp = (value: number) => Math.max(0, Math.min(1, value));+ const candidates: MindmapRelationAnchor[] = ["left", "right", "top", "bottom"].map(side => ({+ side: side as MindmapRelationAnchor["side"],+ ratio: side === "left" || side === "right" ? clamp((point.y - node.y) / (node.height || 1)) :+ clamp((point.x - node.x) / (node.width || 1)),+ }));+ let best = candidates.find(candidate => candidate.side === previous?.side) || candidates[0];+ const distance = (anchor: MindmapRelationAnchor) => {+ const projected = getMindmapRelationAnchorPoint(node, anchor);+ return Math.hypot(point.x - projected.x, point.y - projected.y);+ };+ for (const candidate of candidates) {+ if (distance(candidate) < distance(best) - 1e-9) {+ best = candidate;+ }+ }+ return best;+};++const relationObstacles = (nodes: MindmapRouteBox[], clearance: number) => nodes.flatMap(node => [+ {left: node.x - clearance, right: node.x + node.width + clearance,+ top: node.y - clearance, bottom: node.y + node.height + clearance},+ {left: node.x + node.width - 19, right: node.x + node.width + 61,+ top: (node.controlY ?? node.y + node.height) - 15, bottom: (node.controlY ?? node.y + node.height) + 15},+]);++const segmentIntersectsBox = (a: MindmapRoutePoint, b: MindmapRoutePoint,+ box: ReturnType<typeof relationObstacles>[number]) => a.x === b.x ?+ a.x > box.left && a.x < box.right && Math.max(a.y, b.y) > box.top && Math.min(a.y, b.y) < box.bottom :+ a.y > box.top && a.y < box.bottom && Math.max(a.x, b.x) > box.left && Math.min(a.x, b.x) < box.right;++const satisfiesRelationAnchors = (points: MindmapRoutePoint[], from: MindmapRouteBox, to: MindmapRouteBox,+ anchors: MindmapRelationAnchors) => {+ if (points.length < 2) {+ return false;+ }+ return [{node: from, anchor: anchors.fromAnchor, point: points[0], next: points[1]},+ {node: to, anchor: anchors.toAnchor, point: points[points.length - 1], next: points[points.length - 2]}]+ .every(({node, anchor, point, next}) => {+ if (!anchor) {+ return true;+ }+ const expected = getMindmapRelationAnchorPoint(node, anchor, 3);+ return point.x === expected.x && point.y === expected.y &&+ (anchor.side === "left" ? next.x < point.x && next.y === point.y :+ anchor.side === "right" ? next.x > point.x && next.y === point.y :+ anchor.side === "top" ? next.y < point.y && next.x === point.x :+ next.y > point.y && next.x === point.x);+ });+};+export const routeMindmapRelation = (from: MindmapRouteBox, to: MindmapRouteBox,- nodes: MindmapRouteBox[], clearance = 12): MindmapRoutePoint[] => {+ nodes: MindmapRouteBox[], clearance = 12,+ anchors: MindmapRelationAnchors = {}): MindmapRoutePoint[] => {// 双向连接使用同一条几何路径,避免端口同分时因搜索方向不同而出现错位。const order = from.x - to.x || from.y - to.y || from.width - to.width || from.height - to.height;if (to.width > 0 && to.height > 0 && order > 0) {- return routeMindmapRelation(to, from, nodes, clearance).reverse();+ return routeMindmapRelation(to, from, nodes, clearance,+ {fromAnchor: anchors.toAnchor, toAnchor: anchors.fromAnchor}).reverse();}let best: MindmapRoutePoint[] = [];let bestCost = Infinity;for (const gap of [...new Set([clearance, Math.min(clearance, 6)])]) {- const route = findRelationRoute(from, to, nodes, gap);+ const route = findRelationRoute(from, to, nodes, gap, anchors);if (route.length < 2) {continue;}@@ -34,7 +108,11 @@ export const routeMindmapRelation = (from: MindmapRouteBox, to: MindmapRouteBox,}}// 搜索保留避障空间,绘制端点靠近节点,避免短连接只剩两个挤在一起的箭头。- const attach = (point: MindmapRoutePoint, node: MindmapRouteBox) => {+ const attach = (point: MindmapRoutePoint, node: MindmapRouteBox, anchor?: MindmapRelationAnchor) => {+ if (anchor) {+ Object.assign(point, getMindmapRelationAnchorPoint(node, anchor, 3));+ return;+ }if (!node.width || !node.height) {return;}@@ -49,22 +127,26 @@ export const routeMindmapRelation = (from: MindmapRouteBox, to: MindmapRouteBox,}};if (best.length >= 2) {- attach(best[0], from);- attach(best[best.length - 1], to);+ attach(best[0], from, anchors.fromAnchor);+ attach(best[best.length - 1], to, anchors.toAnchor);+ }+ if ((anchors.fromAnchor || anchors.toAnchor) && !satisfiesRelationAnchors(best, from, to, anchors)) {+ return [];}return best;};// 在障碍边界构成的正交可视网格上搜索,方向纳入状态以惩罚多余转弯。const findRelationRoute = (from: MindmapRouteBox, to: MindmapRouteBox,- nodes: MindmapRouteBox[], clearance: number): MindmapRoutePoint[] => {- const boxes = nodes.flatMap(node => [- {left: node.x - clearance, right: node.x + node.width + clearance,- top: node.y - clearance, bottom: node.y + node.height + clearance},- {left: node.x + node.width - 19, right: node.x + node.width + 61,- top: (node.controlY ?? node.y + node.height) - 15, bottom: (node.controlY ?? node.y + node.height) + 15},- ]);- const ports = (node: MindmapRouteBox, other: MindmapRouteBox) => {+ nodes: MindmapRouteBox[], clearance: number,+ anchors: MindmapRelationAnchors): MindmapRoutePoint[] => {+ const boxes = relationObstacles(nodes, clearance);+ const attachmentObstacles = anchors.fromAnchor || anchors.toAnchor ? relationObstacles(nodes, 0) : [];+ const ports = (node: MindmapRouteBox, other: MindmapRouteBox, anchor?: MindmapRelationAnchor) => {+ if (anchor) {+ return [{...getMindmapRelationAnchorPoint(node, anchor, clearance),+ direction: ["left", "right", "top", "bottom"].indexOf(anchor.side)}];+ }if (!node.width && !node.height) {return [0, 1, 2, 3].map(direction => ({x: node.x, y: node.y, direction}));}@@ -83,11 +165,33 @@ const findRelationRoute = (from: MindmapRouteBox, to: MindmapRouteBox,{x: node.x + node.width + clearance, y, direction: 1}]),];};- const starts = ports(from, to);- const goals = to.width === 0 && to.height === 0 ?- [0, 1, 2, 3].map(direction => ({x: to.x, y: to.y, direction})) : ports(to, from);- const xs = [...new Set([...boxes.flatMap(box => [box.left, box.right]), ...starts.map(p => p.x), ...goals.map(p => p.x)])].sort((a, b) => a - b);- const ys = [...new Set([...boxes.flatMap(box => [box.top, box.bottom]), ...starts.map(p => p.y), ...goals.map(p => p.y)])].sort((a, b) => a - b);+ // 网格之外的引出段也必须避障,包含绘制端点与节点边缘之间的短间隙。+ const clearAttachment = (port: MindmapRoutePoint & {direction: number}, node: MindmapRouteBox) => {+ if ((!anchors.fromAnchor && !anchors.toAnchor) || (!node.width && !node.height)) {+ return true;+ }+ const border = {...port};+ if (port.direction < 2) {+ border.x = node.x + (port.direction === 0 ? 0 : node.width);+ } else {+ border.y = node.y + (port.direction === 2 ? 0 : node.height);+ }+ return !attachmentObstacles.some(box => segmentIntersectsBox(border, port, box));+ };+ const starts = ports(from, to, anchors.fromAnchor).filter(port => clearAttachment(port, from));+ const goals = ports(to, from, anchors.toAnchor).filter(port => clearAttachment(port, to));+ if (!starts.length || !goals.length) {+ return [];+ }+ // 固定边可能朝向整个图的外侧,额外网格线为最外层端口保留垂直引出空间。+ const escapes = anchors.fromAnchor || anchors.toAnchor ? [...starts, ...goals].map(port => ({+ x: port.x + (port.direction === 0 ? -clearance : port.direction === 1 ? clearance : 0),+ y: port.y + (port.direction === 2 ? -clearance : port.direction === 3 ? clearance : 0),+ })) : [];+ const xs = [...new Set([...boxes.flatMap(box => [box.left, box.right]), ...starts.map(p => p.x),+ ...goals.map(p => p.x), ...escapes.map(p => p.x)])].sort((a, b) => a - b);+ const ys = [...new Set([...boxes.flatMap(box => [box.top, box.bottom]), ...starts.map(p => p.y),+ ...goals.map(p => p.y), ...escapes.map(p => p.y)])].sort((a, b) => a - b);const point = (index: number) => ({x: xs[index % xs.length], y: ys[Math.floor(index / xs.length)]});const indexOf = (p: MindmapRoutePoint) => ys.indexOf(p.y) * xs.length + xs.indexOf(p.x);const columns = new Map<number, typeof boxes>();@@ -224,7 +328,8 @@ const decodeMindmapRoute = (route: MindmapManualRoute, from: MindmapRouteBox, to});export const routeManualMindmapRelation = (from: MindmapRouteBox, to: MindmapRouteBox,- nodes: MindmapRouteBox[], route: MindmapManualRoute): MindmapRoutePoint[] => {+ nodes: MindmapRouteBox[], route: MindmapManualRoute,+ anchors: MindmapRelationAnchors = {}): MindmapRoutePoint[] => {const controls = decodeMindmapRoute(route, from, to);const stops = [from, ...controls, to];const result: MindmapRoutePoint[] = [];@@ -234,7 +339,9 @@ export const routeManualMindmapRelation = (from: MindmapRouteBox, to: MindmapRouif (!a.width && !b.width && a.x === b.x && a.y === b.y) {continue;}- const segment = routeMindmapRelation(a, b, nodes);+ const segment = routeMindmapRelation(a, b, nodes, 12,+ {fromAnchor: i === 1 ? anchors.fromAnchor : undefined,+ toAnchor: i === stops.length - 1 ? anchors.toAnchor : undefined});if (segment.length < 2) {return [];}@@ -257,7 +364,7 @@ export const routeManualMindmapRelation = (from: MindmapRouteBox, to: MindmapRousimplified.push(point);}}- return simplified;+ return (anchors.fromAnchor || anchors.toAnchor) && !satisfiesRelationAnchors(simplified, from, to, anchors) ? [] : simplified;};export const moveMindmapRouteSegment = (points: MindmapRoutePoint[], index: number, offset: number): MindmapRoutePoint[] => {diff --git a/app/src/protyle/render/listMindmap/view.ts b/app/src/protyle/render/listMindmap/view.tsindex b555c3894b..2372a582bb 100644--- a/app/src/protyle/render/listMindmap/view.ts+++ b/app/src/protyle/render/listMindmap/view.ts@@ -8,7 +8,8 @@ import {readListMindmap,} from "./model";import {routeMindmapRelation, routeManualMindmapRelation, adjustMindmapRoute,- MindmapRoutePoint, MindmapManualRoute} from "./routing";+ MindmapRoutePoint, MindmapManualRoute, MindmapRelationAnchor,+ projectMindmapRelationAnchor, getMindmapRelationAnchorPoint} from "./routing";import {mathRender} from "../mathRender";import {getAVRichTextSafeURL} from "../av/richTextValue";import {Constants} from "../../../constants";@@ -90,6 +91,8 @@ interface PointerState {endpoint?: "from" | "to";targetId?: string;route?: MindmapManualRoute;+ anchor?: MindmapRelationAnchor;+ routeFallback?: boolean;};}@@ -137,6 +140,7 @@ export class ListMindmapView {private finishRelationEdit?: (save: boolean) => void;private linePaths: {id: string, relation: boolean, summary?: boolean, path: Path2D, arrows?: MindmapRoutePoint[]}[] = [];private relationRoutes = new Map<string, MindmapRoutePoint[]>();+ private anchorFallbackRoutes = new Set<string>();private readonly routeHandles = new Map<string, HTMLButtonElement>();private readonly routeStatus = createElement("div", "mindmap-view__route-status");private readonly fallbackRoutes = new Set<string>();@@ -928,6 +932,7 @@ export class ListMindmapView {this.summaryPositions = layoutListMindmapSummaries(this.model, this.positions, summarySizes);this.relationRoutes.clear();this.fallbackRoutes.clear();+ this.anchorFallbackRoutes.clear();this.edges = result.edges;this.bounds = result;let top = 0;@@ -1276,18 +1281,37 @@ export class ListMindmapView {return {path, start, next, end, previous, arrowSizeLimit, labelPoint};}+ private resolveRelationRoute(relation: ListMindmapRelation | undefined, from: ListMindmapPosition,+ to: ListMindmapPosition, allowAnchorFallback = true) {+ const obstacles = this.routingObstacles();+ if (relation?.route) {+ const points = routeManualMindmapRelation(from, to, obstacles, relation.route, relation);+ if (points.length >= 2) {+ return {points, routeFallback: false, anchorFallback: false};+ }+ }+ const points = routeMindmapRelation(from, to, obstacles, undefined, relation);+ const routeFallback = !!relation?.route;+ if (points.length >= 2 || !allowAnchorFallback || (!relation?.fromAnchor && !relation?.toAnchor)) {+ return {points, routeFallback, anchorFallback: false};+ }+ // 布局变化时保留原约束,临时自动选取接入点;再次可用后恢复保存的位置。+ return {points: routeMindmapRelation(from, to, obstacles), routeFallback, anchorFallback: true};+ }+private calculateRelationRoute(relation: ListMindmapRelation | undefined, from: ListMindmapPosition, to: ListMindmapPosition) {+ const result = this.resolveRelationRoute(relation, from, to);if (relation) {this.fallbackRoutes.delete(relation.id);- if (relation.route) {- const points = routeManualMindmapRelation(from, to, this.routingObstacles(), relation.route);- if (points.length >= 2) {- return points;- }+ this.anchorFallbackRoutes.delete(relation.id);+ if (result.routeFallback) {this.fallbackRoutes.add(relation.id);}+ if (result.anchorFallback) {+ this.anchorFallbackRoutes.add(relation.id);+ }}- return routeMindmapRelation(from, to, this.routingObstacles());+ return result.points;}private renderRouteControls() {@@ -1333,11 +1357,15 @@ export class ListMindmapView {this.routeHandles.delete(key);}});- const invalid = this.pointer?.relation && !this.pointer.relation.valid;+ const invalid = drag && !drag.valid;+ const anchorFallback = !drag && this.anchorFallbackRoutes.size > 0;+ const routeFallback = drag ? drag.valid && drag.routeFallback :+ this.readOnly ? this.fallbackRoutes.size > 0 : this.fallbackRoutes.has(id);this.viewport.classList.toggle("mindmap-view__viewport--route-invalid", !!invalid);- this.routeStatus.hidden = this.readOnly || !!this.options.printLayout || !!this.printTransform ||- (!invalid && !this.fallbackRoutes.has(id));- this.routeStatus.textContent = this.label(invalid ? "invalid" : "listMindmapRouteFallback");+ this.routeStatus.hidden = !!this.options.printLayout || !!this.printTransform ||+ (!invalid && !anchorFallback && !routeFallback);+ this.routeStatus.textContent = this.label(invalid ? drag.anchor ? "listMindmapAnchorInvalid" : "invalid" :+ anchorFallback ? "listMindmapAnchorFallback" : "listMindmapRouteFallback");}private getRouteHandle(id: string, part: number | "from" | "to") {@@ -1419,26 +1447,35 @@ export class ListMindmapView {const from = this.positions.get(relation.from);const to = this.positions.get(relation.to);drag.valid = false;+ if (!from || !to) {+ this.draw();+ return;+ }if (drag.endpoint) {const target = this.positions.get(drag.targetId);const point = target || {id: "", ...drag.handle, width: 0, height: 0};const nextFrom = drag.endpoint === "from" ? point : from;const nextTo = drag.endpoint === "to" ? point : to;- const points = target?.id === relation[drag.endpoint] ? drag.points :- routeMindmapRelation(nextFrom, nextTo, this.routingObstacles());- drag.valid = !!target && this.canReconnectRelation(relation, drag.endpoint, target.id) && points.length >= 2;+ const anchorKey = drag.endpoint === "from" ? "fromAnchor" : "toAnchor";+ const sameNode = target?.id === relation[drag.endpoint];+ const preview = {...relation, [drag.endpoint]: target?.id || relation[drag.endpoint],+ [anchorKey]: sameNode ? drag.anchor : undefined, route: sameNode ? relation.route : undefined};+ const {points, routeFallback} = this.resolveRelationRoute(preview, nextFrom, nextTo, false);+ drag.valid = !!target && (!sameNode || !!drag.anchor) &&+ this.canReconnectRelation(relation, drag.endpoint, target.id) && points.length >= 2;+ drag.routeFallback = routeFallback;if (points.length >= 2) {this.relationRoutes.set(drag.id, points);}this.nodeElements.forEach((element, id) => element.classList.toggle("mindmap-view__node--relation",- drag.valid && id === drag.targetId));+ id === drag.targetId && (sameNode || drag.valid)));this.draw();return;}const route = from && to && adjustMindmapRoute(drag.points, drag.segment, drag.offset, from, to,this.fallbackRoutes.has(drag.id) ? undefined : relation.route);if (route) {- const points = routeManualMindmapRelation(from, to, this.routingObstacles(), route);+ const points = routeManualMindmapRelation(from, to, this.routingObstacles(), route, relation);if (points.length >= 2) {drag.route = route;drag.valid = true;@@ -1469,6 +1506,19 @@ export class ListMindmapView {});}+ private resetRelationAnchors(id: string) {+ if (this.readOnly) {+ return;+ }+ this.cancelPointer();+ this.finishThen(() => {+ const relation = this.model.metadata.relations.find(item => item.id === id);+ if (!this.readOnly && (relation?.fromAnchor || relation?.toAnchor)) {+ this.options.onRelationChange?.(id, {fromAnchor: undefined, toAnchor: undefined}, JSON.stringify(relation));+ }+ });+ }+private draw() {if (this.destroyed) {return;@@ -2005,6 +2055,20 @@ export class ListMindmapView {drag.targetId = [...this.positions.values()].find(node => drag.handle.x >= node.x &&drag.handle.x <= node.x + node.width && drag.handle.y >= node.y &&drag.handle.y <= node.y + node.height)?.id;+ const relation = this.model.metadata.relations.find(item => item.id === drag.id);+ const original = this.positions.get(relation?.[drag.endpoint]);+ const tolerance = (event.pointerType === "touch" ? 16 : 8) / this.scale;+ // 真实节点命中优先于原节点的近边吸附,避免缩小时抢占换接目标。+ if (original && (!drag.targetId || drag.targetId === original.id) &&+ drag.handle.x >= original.x - tolerance && drag.handle.x <= original.x + original.width + tolerance &&+ drag.handle.y >= original.y - tolerance && drag.handle.y <= original.y + original.height + tolerance) {+ drag.targetId = original.id;+ const anchor = relation[drag.endpoint === "from" ? "fromAnchor" : "toAnchor"];+ drag.anchor = {...anchor, ...projectMindmapRelationAnchor(original, drag.handle, drag.anchor || anchor)};+ drag.handle = getMindmapRelationAnchorPoint(original, drag.anchor, 3);+ } else {+ drag.anchor = undefined;+ }} else {drag.offset = (drag.points[drag.segment].y === drag.points[drag.segment + 1].y ? dy : dx) / this.scale;}@@ -2110,8 +2174,19 @@ export class ListMindmapView {this.cancelPointer();const relation = this.model.metadata.relations.find(item => item.id === drag.id);if (moved && drag.endpoint && drag.valid && relation && !this.readOnly &&- relation[drag.endpoint] !== drag.targetId && this.canReconnectRelation(relation, drag.endpoint, drag.targetId)) {- this.options.onRelationChange?.(drag.id, {[drag.endpoint]: drag.targetId, route: undefined}, drag.original);+ this.canReconnectRelation(relation, drag.endpoint, drag.targetId)) {+ const anchorKey = drag.endpoint === "from" ? "fromAnchor" : "toAnchor";+ if (relation[drag.endpoint] === drag.targetId) {+ if (drag.anchor && JSON.stringify(relation[anchorKey]) !== JSON.stringify(drag.anchor)) {+ this.options.onRelationChange?.(drag.id, {[anchorKey]: drag.anchor}, drag.original);+ }+ } else {+ const patch: Partial<ListMindmapRelation> = {[drag.endpoint]: drag.targetId, route: undefined};+ if (relation[anchorKey]) {+ patch[anchorKey] = undefined;+ }+ this.options.onRelationChange?.(drag.id, patch, drag.original);+ }} else if (moved && !drag.endpoint && Math.abs(drag.offset) > .01 && drag.valid && drag.route && !this.readOnly) {this.options.onRelationChange?.(drag.id, {route: drag.route}, drag.original);}@@ -2806,6 +2881,9 @@ export class ListMindmapView {}this.inspector.append(squareButton("edit", "iconEdit", () => this.editRelationLabel()),squareButton("delete", "iconTrashcan", () => this.options.onRelationDelete?.(relation.id)));+ if (relation.fromAnchor || relation.toAnchor) {+ this.inspector.append(squareButton("listMindmapAnchorReset", "iconRefresh", () => this.resetRelationAnchors(relation.id)));+ }return;}if (this.selectedEdge) {diff --git a/docs/LIST-MINDMAP.md b/docs/LIST-MINDMAP.mdindex d5c206011c..932522f928 100644--- a/docs/LIST-MINDMAP.md+++ b/docs/LIST-MINDMAP.md@@ -20,9 +20,9 @@- 使用节点旁的按钮添加子节点或折叠,选中节点后按 Delete 或 Backspace 删除(兼容 macOS 的 Delete 键);最后一个根节点保留,避免产生不能保存的空列表;撤销和重做保留编辑器快捷键,工具栏不再显示对应按钮- 点击画布空白处或脑图外部取消选中,收起节点样式及关系线设置;点击节点继续选择关系线终点,点击其他区域取消连线- 连接按钮使用带箭头的弯曲连线图标,位于缩小按钮前;先选择起点,再选择终点,可编辑文字、颜色或删除关系线;路径通过正交可视网格上的 A* 搜索避开节点和折叠、添加按钮区域,减少转弯并绘制圆角,布局变化时重新计算,平移和缩放时复用路径-- 关系线支持直接拖动,选中后在线段上显示手柄;水平线段上下拖动,垂直线段左右拖动,首尾线段保留连接节点的引出段;拖动时固定节点布局和画布,实时预览避障路径,松手保存一次事务,Esc 或指针取消恢复原路径;双击拖拽手柄恢复自动计算,双击线条或文字编辑关系文字;只读及导出显示保存的路径,不显示调整手柄+- 关系线支持直接拖动,选中后在线段上显示手柄;水平线段上下拖动,垂直线段左右拖动,首尾线段保留连接节点的引出段;拖动时固定节点布局和画布,实时预览避障路径,松手保存一次事务,Esc 或指针取消恢复原路径;双击线段拖拽手柄只恢复自动中间路径,保留两端连接点设置,双击线条或文字编辑关系文字;只读及导出按相同规则显示保存的路径,不显示调整手柄- 选中关系线后,在底部设置中通过“箭头方向”选择正向箭头、反向箭头、双向箭头或无箭头;默认从连接起点指向终点,反向则从终点指向起点;切换时只改变箭头显示,保留连接节点、关系文字和手动路径,支持撤销和重做,不影响父子节点之间的树连线-- 选中关系线后,空心圆标出连接起点,实心圆标出连接终点,与箭头方向无关;拖动圆形手柄更换对应节点,可连接的节点会高亮;松手后重新计算路径并保存到同一事务,保留关系文字和样式,支持撤销;落在空白处、原节点、自身或已有的同向连接上不修改关系线;节点上的具体连接位置仍由系统自动选择,不支持自由拖动端点位置+- 选中关系线后,空心圆标出连接起点,实心圆标出连接终点,与箭头方向无关;使用鼠标或触屏拖动圆形手柄,可沿原节点四边连续调整连接位置,也可拖到其他有效节点上更换对应节点;松手后重新计算路径并保存一次可撤销事务,保留关系文字、样式和箭头方向;落在空白处、无效目标、另一端节点或已有的同向连接上不修改关系线,新连接位置无法避开节点或控件时提示并取消,不将自动位置当作拖动成功;旧关系线和新建关系线的连接点默认自动选择,手动调整后随节点文字尺寸和布局变化而移动;底部“恢复自动接入”按钮同时清除两端手动连接点,保留手动调整的中间路径- 节点默认无背景、不显示边框,正文格式通过节点内的 Protyle 编辑;选中节点后,脑图面板底部显示单排配色工具栏,仅展示节点配色及颜色管理入口,复用外观面板中的文字色与背景色组合,包含内置及自定义颜色并遵循其顺序和可见性,可恢复默认色;点击树连线或关系线,在脑图面板底部显示对应的设置菜单,线条颜色复用外观背景色,菜单不显示标题栏、虚线及宽度控件;双击关系线文字,在原位置显示输入框进行编辑- 滚轮或触控板滚动用于移动画布,Ctrl + 滚轮或触控板双指捏合以鼠标位置为中心缩放;工具栏提供缩放、适应画布和全屏;全屏沿用编辑器的窗口内全屏及窗口控件避让,点击全屏按钮或按 Esc 退出并回到原列表位置- 鼠标移入脑图外框时显示尺寸手柄,右边缘调整宽度、下边缘调整高度、右下角同时调整宽高,触屏可直接拖动;调整的是块在文档中的尺寸,不改变内部画布缩放,原有块菜单宽高设置仍可使用;松手保存一次可撤销的修改,Esc 或指针取消恢复原尺寸@@ -39,7 +39,7 @@列表块使用 `custom-sy-list-mindmap="1"` 启用脑图视图。`custom-sy-list-mindmap-data` 保存版本为 `1` 的节点样式和关系线配置。关闭脑图视图保留该配置;折叠使用列表项的已有 `fold` 属性。未知版本或损坏的配置不会被自动覆盖,原列表仍可查看。-关系线可选的 `route` 字段使用独立的 `version: 1`,`points` 保存不超过 64 个控制点。每个控制点的 `x`、`y` 是相对两个节点中心插值位置的偏移,`t` 是沿路径长度计算的插值比例(0 到 1),坐标偏移的绝对值不超过 1000000。缺少 `route` 表示自动路径;双击恢复时只删除该字段,保留文字、样式和端点。旧配置无需迁移,未知路径版本及损坏配置保留原值。节点位置变化时重新避障,暂时无法使用的手动路径仍保留配置并显示自动路径,恢复可用布局后重新使用手动路径。拖动期间的外部刷新取消预览,提交前核对关系线快照,避免覆盖较新的配置。+关系线可选的 `route` 字段使用独立的 `version: 1`,`points` 保存不超过 64 个控制点。每个控制点的 `x`、`y` 是相对两个节点中心插值位置的偏移,`t` 是沿路径长度计算的插值比例(0 到 1),坐标偏移的绝对值不超过 1000000。缺少 `route` 表示自动中间路径;双击线段手柄恢复时只删除该字段,保留文字、样式和端点连接点。关系线的可选 `fromAnchor`、`toAnchor` 分别保存起点和终点的手动连接位置,每项包含 `side`(`left`、`right`、`top` 或 `bottom`)和 `ratio`(0 到 1);缺少相应字段表示该端自动选择,元数据版本仍为 `1`,旧配置无需迁移。比例跟随节点尺寸,位置跟随节点布局;“恢复自动接入”只删除这两个字段,不删除 `route`。未知版本及损坏配置保留原值。布局变化时优先重新使用手动路径;若手动路径无法避障,则保留指定连接点并暂时显示自动中间路径;指定连接点也无法使用时,才暂时显示自动连接点。两类回退分别显示明确提示,保存的路径和连接点均保留,恢复可用布局后重新使用;只读交互视图也显示提示,打印可隐藏提示但采用相同的几何规则。拖动期间的外部刷新取消预览,提交前核对关系线快照,避免覆盖较新的配置。关系线的可选 `arrowDirection` 字段支持 `forward`、`reverse`、`both` 和 `none`,分别表示正向、反向、双向和无箭头;缺少该字段时沿用 `forward`,旧配置无需迁移。箭头方向与 `from`、`to` 端点及 `route` 路径独立,反向显示不交换端点或重置手动路径,端点手柄始终表示连接的起点和终点。只读、发布及思源格式的 HTML/PDF 预览按保存的方向显示箭头。@@ -55,7 +55,7 @@脑图 DOM、画布、全屏占位和编辑器均为派生显示内容,不写入列表事务或剪贴板的思源块数据。此功能沿用现有块存储、加密、历史和备份格式。-关系线路由使用带进出方向约束的正交网格搜索,按节点边界及目标位置选择连接点,禁止立即折返。路线代价综合长度及转弯,各条关系线独立计算,不避让已有线条;新增连接的吸附预览与落点使用相同规则。节点宽度变化时可选择与目标对齐的连接点,节点和折叠、添加按钮仍作为避让区域。+关系线路由使用带进出方向约束的正交网格搜索,自动模式按节点边界及目标位置选择连接点,手动模式使用保存的边和比例,禁止立即折返。路线代价综合长度及转弯,各条关系线独立计算,不避让已有线条;新增连接的吸附预览与落点使用相同规则。自动连接点在节点宽度变化时可重新与目标对齐;手动连接点保持指定边及比例,节点和折叠、添加按钮仍作为避让区域。再次拖动手动路径时移动保存的控制点,自动避障拐点不转成固定约束;往回拖过相邻折线时收起被跨过的控制点,进入端点区域时将控制点退到两节点之间,避免绕行路径无法缩回。diff --git a/kernel/model/transaction_list_mindmap.go b/kernel/model/transaction_list_mindmap.goindex 7032a174c5..45d1c3c449 100644--- a/kernel/model/transaction_list_mindmap.go+++ b/kernel/model/transaction_list_mindmap.go@@ -89,11 +89,29 @@ func validListMindmapMetadata(data map[string]any) bool {if route, exists := relation["route"]; exists && !validListMindmapRoute(route) {return false}+ for _, key := range []string{"fromAnchor", "toAnchor"} {+ if value, exists := relation[key]; exists && !validListMindmapRelationAnchor(value) {+ return false+ }+ }seen[relation["id"].(string)] = true}return true}+func validListMindmapRelationAnchor(value any) bool {+ anchor, ok := value.(map[string]any)+ if !ok {+ return false+ }+ side, ok := anchor["side"].(string)+ if !ok || !slices.Contains([]string{"left", "right", "top", "bottom"}, side) {+ return false+ }+ ratio, ok := anchor["ratio"].(float64)+ return ok && !math.IsNaN(ratio) && !math.IsInf(ratio, 0) && ratio >= 0 && ratio <= 1+}+func validListMindmapRoute(value any) bool {route, ok := value.(map[string]any)if !ok || route["version"] != float64(1) {diff --git a/kernel/model/transaction_list_mindmap_test.go b/kernel/model/transaction_list_mindmap_test.goindex 4289f5934c..c91029a8b5 100644--- a/kernel/model/transaction_list_mindmap_test.go+++ b/kernel/model/transaction_list_mindmap_test.go@@ -2,6 +2,7 @@ package modelimport ("encoding/json"+ "math""strings""testing"@@ -113,6 +114,52 @@ func TestPruneListMindmapArrowDirections(t *testing.T) {}}+func TestPruneListMindmapRelationAnchors(t *testing.T) {+ for _, side := range []string{"left", "right", "top", "bottom"} {+ for _, ratio := range []string{"0", "0.317", "1"} {+ _, list, _ := mindmapTestTree()+ anchor := `{"side":"` + side + `","ratio":` + ratio + `,"extension":9007199254740993}`+ original := `{"version":1,"nodes":{"deleted":{}},"relations":[{"id":"r","from":"` + list.ID ++ `","to":"child","label":"Keep","fromAnchor":` + anchor + `,"toAnchor":` + anchor ++ `,"route":{"version":1,"points":[{"x":10,"y":20,"t":0.5}]},"arrowDirection":"reverse"}]}`+ list.SetIALAttr(listMindmapMetadataAttr, original)+ next, changed := pruneListMindmapMetadata(list)+ if !changed || strings.Contains(next, "deleted") || strings.Count(next, anchor) != 2 ||+ !strings.Contains(next, `"arrowDirection":"reverse"`) ||+ !strings.Contains(next, `"points":[{"x":10,"y":20,"t":0.5}]`) {+ t.Fatalf("anchor metadata or extension was lost during pruning: %s", next)+ }+ list.SetIALAttr(listMindmapMetadataAttr, next)+ if again, changed := pruneListMindmapMetadata(list); changed || again != next {+ t.Fatal("anchor normalization should be idempotent")+ }+ }+ }+}++func TestPruneListMindmapPreservesInvalidAnchors(t *testing.T) {+ for _, key := range []string{"fromAnchor", "toAnchor"} {+ for _, anchor := range []string{+ `null`, `[]`, `{}`, `"left"`, `{"side":"center","ratio":0.5}`, `{"side":["left"],"ratio":0.5}`,+ `{"side":"left"}`, `{"ratio":0.5}`, `{"side":"left","ratio":null}`,+ `{"side":"left","ratio":"0.5"}`, `{"side":"left","ratio":-0.001}`,+ `{"side":"left","ratio":1.001}`, `{"side":"left","ratio":1e999}`,+ } {+ _, list, _ := mindmapTestTree()+ original := `{"version":1,"nodes":{"deleted":{}},"relations":[{"id":"r","from":"a","to":"b","label":"","` + key + `":` + anchor + `}]}`+ list.SetIALAttr(listMindmapMetadataAttr, original)+ if next, changed := pruneListMindmapMetadata(list); changed || next != original {+ t.Fatalf("invalid anchor configuration changed: %s", next)+ }+ }+ }+ for _, ratio := range []float64{math.NaN(), math.Inf(1), math.Inf(-1), -0.001, 1.001} {+ if validListMindmapRelationAnchor(map[string]any{"side": "left", "ratio": ratio}) {+ t.Fatalf("invalid anchor ratio accepted: %v", ratio)+ }+ }+}+func TestPruneListMindmapExcludesListsInsideContentBlocks(t *testing.T) {_, list, child := mindmapTestTree()quote := &ast.Node{Type: ast.NodeBlockquote, ID: "quote"}