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 temporary right-button mind map panning https://github.com/siyuan-note/siyuan/issues/20670
Daniel6b2b4a161cec
diff --git a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-h361q1i/20200924093441-ft2rhps.sy b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-h361q1i/20200924093441-ft2rhps.syindex 8c9447c67e..b29b7b9a92 100644--- a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-h361q1i/20200924093441-ft2rhps.sy+++ b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-h361q1i/20200924093441-ft2rhps.sy@@ -8,7 +8,7 @@"title": "Formatting elements","title-img": "background-color:#269;background-image: linear-gradient(white 2px, transparent 2px),linear-gradient(90deg, white 2px, transparent 2px),linear-gradient(rgba(255,255,255,.3) 1px, transparent 1px),linear-gradient(90deg, rgba(255,255,255,.3) 1px, transparent 1px);background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;background-position:-2px -2px, -2px -2px, -1px -1px, -1px -1px;","type": "doc",- "updated": "20261018163000"+ "updated": "20261018200107"},"Children": [{@@ -1961,7 +1961,7 @@"HeadingLevel": 2,"Properties": {"id": "20210104091509-v1x69oc",- "updated": "20261018163000"+ "updated": "20261018200107"},"Children": [{@@ -2000,12 +2000,12 @@"Type": "NodeParagraph","Properties": {"id": "20261018163000-gjcy3xw",- "updated": "20261018163000"+ "updated": "20261018200107"},"Children": [{"Type": "NodeText",- "Data": "Mind maps initially leave the mouse wheel and one-finger swipes to document scrolling. On desktop, click the map to activate canvas interaction. On mobile, use the Hand Tool for one-finger panning, or double-tap a node to edit it. Turn off the Hand Tool to select or drag nodes. An active canvas has a highlighted border and handles wheel panning and one-finger dragging, including at the pan boundary. Click outside the map, move keyboard focus outside it, or press Esc on the canvas to return to reading. Full-screen maps stay active until you exit full screen."+ "Data": "Mind maps initially leave the mouse wheel and one-finger swipes to document scrolling. On desktop, click the map to activate canvas interaction. On mobile, use the Hand Tool for one-finger panning, or double-tap a node to edit it. Turn off the Hand Tool to select or drag nodes. An active canvas has a highlighted border. Use the wheel or drag with the right mouse button to pan; the Hand Tool also allows left-button panning. Ordinary left dragging on blank canvas does not pan. Active one-finger gestures pan the canvas on touch screens. At the pan boundary, input stays with the canvas instead of scrolling the document. Click outside the map, move keyboard focus outside it, or press Esc on the canvas to return to reading. Full-screen maps stay active until you exit full screen."}]},@@ -2013,12 +2013,13 @@"ID": "20261018163000-cvdncjc","Type": "NodeParagraph","Properties": {- "id": "20261018163000-cvdncjc"+ "id": "20261018163000-cvdncjc",+ "updated": "20261018200107"},"Children": [{"Type": "NodeText",- "Data": "Without activating the canvas, hold Ctrl (Command on macOS) while using the mouse wheel to zoom around the pointer, or use two fingers to zoom and pan on a touch screen. These gestures do not keep the canvas active. A saved view lock still disables editing, zooming, and panning; activate the canvas after unlocking when needed."+ "Data": "Without activating the canvas, hold Ctrl (Command on macOS) while using the mouse wheel to zoom around the pointer, or hold the same key and drag with the right mouse button to pan temporarily. Temporary panning preserves keyboard focus and node selection. On a touch screen, use two fingers to zoom and pan. These gestures preserve the current reading or active state. A saved view lock still disables editing, zooming, and panning; activate the canvas after unlocking when needed."}]},diff --git a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20200924100950-9op5xi1.sy b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20200924100950-9op5xi1.syindex 42fd57813e..70d074bf57 100644--- a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20200924100950-9op5xi1.sy+++ b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-xaduj2o/20200924100950-9op5xi1.sy@@ -7,7 +7,7 @@"id": "20200924100950-9op5xi1","title": "Shortcuts","type": "doc",- "updated": "20261017003000"+ "updated": "20261018200107"},"Children": [{@@ -4365,7 +4365,7 @@"HeadingLevel": 2,"Properties": {"id": "20210106154056-koo4wdj",- "updated": "20261016013311"+ "updated": "20261018200107"},"Children": [{@@ -13115,7 +13115,7 @@"Type": "NodeHeading","Properties": {"id": "20260921105011-4zeuyl4",- "updated": "20261017003000"+ "updated": "20261018200107"},"HeadingLevel": 3,"Children": [@@ -13138,6 +13138,20 @@}]},+ {+ "ID": "20261018200107-p7ncdxc",+ "Type": "NodeParagraph",+ "Properties": {+ "id": "20261018200107-p7ncdxc",+ "updated": "20261018200107"+ },+ "Children": [+ {+ "Type": "NodeText",+ "Data": "Hold Ctrl (Command on macOS) and drag the canvas with the right mouse button to pan temporarily without changing keyboard focus or activating a reading canvas. Ordinary wheel input then continues scrolling the document. This gesture is unavailable while the view is locked. Ordinary left dragging on blank canvas does not pan; the Hand Tool allows left-button panning."+ }+ ]+ },{"ID": "20260921105011-3srqnh0","Type": "NodeTable",diff --git a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180320-abz7w6k/20200825162036-4dx365o.sy b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180320-abz7w6k/20200825162036-4dx365o.syindex 42801b0694..5528a9e997 100644--- a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180320-abz7w6k/20200825162036-4dx365o.sy+++ b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180320-abz7w6k/20200825162036-4dx365o.sy@@ -8,7 +8,7 @@"title": "排版元素","title-img": "background-color: hsl(2, 57%, 40%);background-image: repeating-linear-gradient(transparent, transparent 50px, rgba(0,0,0,.4) 50px, rgba(0,0,0,.4) 53px, transparent 53px, transparent 63px, rgba(0,0,0,.4) 63px, rgba(0,0,0,.4) 66px, transparent 66px, transparent 116px, rgba(0,0,0,.5) 116px, rgba(0,0,0,.5) 166px, rgba(255,255,255,.2) 166px, rgba(255,255,255,.2) 169px, rgba(0,0,0,.5) 169px, rgba(0,0,0,.5) 179px, rgba(255,255,255,.2) 179px, rgba(255,255,255,.2) 182px, rgba(0,0,0,.5) 182px, rgba(0,0,0,.5) 232px, transparent 232px),repeating-linear-gradient(270deg, transparent, transparent 50px, rgba(0,0,0,.4) 50px, rgba(0,0,0,.4) 53px, transparent 53px, transparent 63px, rgba(0,0,0,.4) 63px, rgba(0,0,0,.4) 66px, transparent 66px, transparent 116px, rgba(0,0,0,.5) 116px, rgba(0,0,0,.5) 166px, rgba(255,255,255,.2) 166px, rgba(255,255,255,.2) 169px, rgba(0,0,0,.5) 169px, rgba(0,0,0,.5) 179px, rgba(255,255,255,.2) 179px, rgba(255,255,255,.2) 182px, rgba(0,0,0,.5) 182px, rgba(0,0,0,.5) 232px, transparent 232px),repeating-linear-gradient(125deg, transparent, transparent 2px, rgba(0,0,0,.2) 2px, rgba(0,0,0,.2) 3px, transparent 3px, transparent 5px, rgba(0,0,0,.2) 5px);","type": "doc",- "updated": "20261018163000"+ "updated": "20261018200107"},"Children": [{@@ -1964,7 +1964,7 @@"HeadingLevel": 2,"Properties": {"id": "20210104091228-wdpx6ev",- "updated": "20261018163000"+ "updated": "20261018200107"},"Children": [{@@ -2003,12 +2003,12 @@"Type": "NodeParagraph","Properties": {"id": "20261018163000-vnuug6c",- "updated": "20261018163000"+ "updated": "20261018200107"},"Children": [{"Type": "NodeText",- "Data": "思维导图默认将鼠标滚轮和单指滑动交给文档滚动。桌面端点击导图即可操作画布;移动端可使用工具栏中的“手形工具”进行单指平移,关闭手形工具后可选择、拖动或双击编辑节点,也可在阅读时直接双击节点进入编辑。操作中的画布显示高亮边框,滚轮和单指拖动用于平移画布,到达平移边界后也不会滚动文档。点击导图外部、将键盘焦点移到外部,或在画布上按 Esc 即可恢复阅读。全屏时保持画布操作,退出全屏后恢复阅读。"+ "Data": "思维导图默认将鼠标滚轮和单指滑动交给文档滚动。桌面端点击导图即可操作画布;移动端可使用工具栏中的“手形工具”进行单指平移,关闭手形工具后可选择、拖动或双击编辑节点,也可在阅读时直接双击节点进入编辑。操作中的画布显示高亮边框,可用滚轮或鼠标右键拖动平移画布,启用手形工具后也可用左键拖动平移。普通模式下,空白区域的左键拖动不会平移画布。移动端操作时可用单指拖动平移画布,到达平移边界后也不会滚动文档。点击导图外部、将键盘焦点移到外部,或在画布上按 Esc 即可恢复阅读。全屏时保持画布操作,退出全屏后恢复阅读。"}]},@@ -2016,12 +2016,13 @@"ID": "20261018163000-rtw5v99","Type": "NodeParagraph","Properties": {- "id": "20261018163000-rtw5v99"+ "id": "20261018163000-rtw5v99",+ "updated": "20261018200107"},"Children": [{"Type": "NodeText",- "Data": "无需进入画布操作,也可以按住 Ctrl(macOS 为 Command)滚动鼠标滚轮,以指针为中心缩放,或在触屏上用双指缩放、平移。这些手势不会持续接管后续滚动。已保存的视图锁定仍禁止编辑、缩放和平移,解锁后可按需进入画布操作。"+ "Data": "无需进入画布操作,也可以按住 Ctrl(macOS 为 Command)滚动鼠标滚轮,以指针为中心缩放,或按住同一按键并用鼠标右键拖动画布进行临时平移。临时平移保留键盘焦点和节点选中状态。触屏上可用双指缩放、平移。这些手势保持当前的阅读或画布操作状态。已保存的视图锁定仍禁止编辑、缩放和平移,解锁后可按需进入画布操作。"}]},diff --git a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200813004551-gm0pbn1.sy b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200813004551-gm0pbn1.syindex 0384b04efe..409400889a 100644--- a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200813004551-gm0pbn1.sy+++ b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200813004551-gm0pbn1.sy@@ -7,7 +7,7 @@"id": "20200813004551-gm0pbn1","title": "快捷键","type": "doc",- "updated": "20261017003000"+ "updated": "20261018200107"},"Children": [{@@ -4363,7 +4363,7 @@"HeadingLevel": 2,"Properties": {"id": "20201227133317-rkh4bji",- "updated": "20261016013311"+ "updated": "20261018200107"},"Children": [{@@ -13097,7 +13097,7 @@"Type": "NodeHeading","Properties": {"id": "20260921105011-hmrchvc",- "updated": "20261017003000"+ "updated": "20261018200107"},"HeadingLevel": 3,"Children": [@@ -13120,6 +13120,20 @@}]},+ {+ "ID": "20261018200107-yv270lj",+ "Type": "NodeParagraph",+ "Properties": {+ "id": "20261018200107-yv270lj",+ "updated": "20261018200107"+ },+ "Children": [+ {+ "Type": "NodeText",+ "Data": "按住 Ctrl(macOS 为 Command)并用鼠标右键拖动画布可临时平移,不会改变键盘焦点或激活阅读中的画布,之后普通滚轮仍滚动文档。视图锁定时此手势不可用。普通模式下空白区域的左键拖动不会平移画布;启用手形工具后可用左键拖动平移。"+ }+ ]+ },{"ID": "20260921105011-fr0uxw6","Type": "NodeTable",diff --git a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226120854-dr1jfx2/20211226121319-emrk2yy.sy b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226120854-dr1jfx2/20211226121319-emrk2yy.syindex 14117f05e3..d583f3d97d 100644--- a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226120854-dr1jfx2/20211226121319-emrk2yy.sy+++ b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226120854-dr1jfx2/20211226121319-emrk2yy.sy@@ -8,7 +8,7 @@"title": "排版元素","title-img": "background-color: hsl(2, 57%, 40%);background-image: repeating-linear-gradient(transparent, transparent 50px, rgba(0,0,0,.4) 50px, rgba(0,0,0,.4) 53px, transparent 53px, transparent 63px, rgba(0,0,0,.4) 63px, rgba(0,0,0,.4) 66px, transparent 66px, transparent 116px, rgba(0,0,0,.5) 116px, rgba(0,0,0,.5) 166px, rgba(255,255,255,.2) 166px, rgba(255,255,255,.2) 169px, rgba(0,0,0,.5) 169px, rgba(0,0,0,.5) 179px, rgba(255,255,255,.2) 179px, rgba(255,255,255,.2) 182px, rgba(0,0,0,.5) 182px, rgba(0,0,0,.5) 232px, transparent 232px),repeating-linear-gradient(270deg, transparent, transparent 50px, rgba(0,0,0,.4) 50px, rgba(0,0,0,.4) 53px, transparent 53px, transparent 63px, rgba(0,0,0,.4) 63px, rgba(0,0,0,.4) 66px, transparent 66px, transparent 116px, rgba(0,0,0,.5) 116px, rgba(0,0,0,.5) 166px, rgba(255,255,255,.2) 166px, rgba(255,255,255,.2) 169px, rgba(0,0,0,.5) 169px, rgba(0,0,0,.5) 179px, rgba(255,255,255,.2) 179px, rgba(255,255,255,.2) 182px, rgba(0,0,0,.5) 182px, rgba(0,0,0,.5) 232px, transparent 232px),repeating-linear-gradient(125deg, transparent, transparent 2px, rgba(0,0,0,.2) 2px, rgba(0,0,0,.2) 3px, transparent 3px, transparent 5px, rgba(0,0,0,.2) 5px);","type": "doc",- "updated": "20261018163000"+ "updated": "20261018200107"},"Children": [{@@ -1962,7 +1962,7 @@"HeadingLevel": 2,"Properties": {"id": "20211226122008-731sqd6",- "updated": "20261018163000"+ "updated": "20261018200107"},"Children": [{@@ -2001,12 +2001,12 @@"Type": "NodeParagraph","Properties": {"id": "20261018163000-b7er7oa",- "updated": "20261018163000"+ "updated": "20261018200107"},"Children": [{"Type": "NodeText",- "Data": "心智圖預設將滑鼠滾輪和單指滑動交給文件捲動。桌面版點擊心智圖即可操作畫布;行動版可使用工具列中的「手形工具」進行單指平移,關閉手形工具後可選取、拖曳或按兩下編輯節點,也可在閱讀時直接按兩下節點進入編輯。操作中的畫布顯示醒目邊框,滾輪和單指拖曳用於平移畫布,到達平移邊界後也不會捲動文件。點擊心智圖外部、將鍵盤焦點移到外部,或在畫布上按 Esc 即可恢復閱讀。全螢幕時保持畫布操作,離開全螢幕後恢復閱讀。"+ "Data": "心智圖預設將滑鼠滾輪和單指滑動交給文件捲動。桌面版點擊心智圖即可操作畫布;行動版可使用工具列中的「手形工具」進行單指平移,關閉手形工具後可選取、拖曳或按兩下編輯節點,也可在閱讀時直接按兩下節點進入編輯。操作中的畫布顯示醒目邊框,可用滾輪或滑鼠右鍵拖曳平移畫布,啟用手形工具後也可用左鍵拖曳平移。一般模式下,空白區域的左鍵拖曳不會平移畫布。行動版操作時可用單指拖曳平移畫布,到達平移邊界後也不會捲動文件。點擊心智圖外部、將鍵盤焦點移到外部,或在畫布上按 Esc 即可恢復閱讀。全螢幕時保持畫布操作,離開全螢幕後恢復閱讀。"}]},@@ -2014,12 +2014,13 @@"ID": "20261018163000-byam24i","Type": "NodeParagraph","Properties": {- "id": "20261018163000-byam24i"+ "id": "20261018163000-byam24i",+ "updated": "20261018200107"},"Children": [{"Type": "NodeText",- "Data": "無須進入畫布操作,也可以按住 Ctrl(macOS 為 Command)捲動滑鼠滾輪,以指標為中心縮放,或在觸控螢幕上用雙指縮放、平移。這些手勢不會持續接管後續捲動。已儲存的檢視鎖定仍禁止編輯、縮放和平移,解鎖後可視需要進入畫布操作。"+ "Data": "無須進入畫布操作,也可以按住 Ctrl(macOS 為 Command)捲動滑鼠滾輪,以指標為中心縮放,或按住同一按鍵並用滑鼠右鍵拖曳畫布進行暫時平移。暫時平移保留鍵盤焦點和節點選取狀態。觸控螢幕上可用雙指縮放、平移。這些手勢保持目前的閱讀或畫布操作狀態。已儲存的檢視鎖定仍禁止編輯、縮放和平移,解鎖後可視需要進入畫布操作。"}]},diff --git a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226122549-jktxego.sy b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226122549-jktxego.syindex 7bbb1c49c6..c2e2b6bf4a 100644--- a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226122549-jktxego.sy+++ b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226121203-rjjngpz/20211226122549-jktxego.sy@@ -7,7 +7,7 @@"id": "20211226122549-jktxego","title": "快捷鍵","type": "doc",- "updated": "20261017003000"+ "updated": "20261018200107"},"Children": [{@@ -4357,7 +4357,7 @@"HeadingLevel": 2,"Properties": {"id": "20211226122652-htptsmh",- "updated": "20261016013311"+ "updated": "20261018200107"},"Children": [{@@ -13103,7 +13103,7 @@"Type": "NodeHeading","Properties": {"id": "20260921105011-z0oyw36",- "updated": "20261017003000"+ "updated": "20261018200107"},"HeadingLevel": 3,"Children": [@@ -13126,6 +13126,20 @@}]},+ {+ "ID": "20261018200107-s3tp7x9",+ "Type": "NodeParagraph",+ "Properties": {+ "id": "20261018200107-s3tp7x9",+ "updated": "20261018200107"+ },+ "Children": [+ {+ "Type": "NodeText",+ "Data": "按住 Ctrl(macOS 為 Command)並用滑鼠右鍵拖曳畫布可暫時平移,不會改變鍵盤焦點或啟用閱讀中的畫布,之後一般滾輪仍捲動文件。檢視鎖定時此手勢無法使用。一般模式下空白區域的左鍵拖曳不會平移畫布;啟用手形工具後可用左鍵拖曳平移。"+ }+ ]+ },{"ID": "20260921105011-f8y6pxv","Type": "NodeTable",diff --git a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-xsbxokr.sy b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-xsbxokr.syindex 4e88321537..6914ae2a30 100644--- a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-xsbxokr.sy+++ b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-g3ugxml/20240530101000-xsbxokr.sy@@ -9,7 +9,7 @@"id": "20240530101000-xsbxokr","title": "ショートカット","type": "doc",- "updated": "20261017003000"+ "updated": "20261018200107"},"Children": [{@@ -4311,7 +4311,7 @@"Properties": {"ID": "20240530101000-twmuxke","id": "20240530101000-675gu9g",- "updated": "20261016013311"+ "updated": "20261018200107"},"Children": [{@@ -13053,7 +13053,7 @@"Type": "NodeHeading","Properties": {"id": "20260921105011-icqlkb6",- "updated": "20261017003000"+ "updated": "20261018200107"},"HeadingLevel": 3,"Children": [@@ -13076,6 +13076,20 @@}]},+ {+ "ID": "20261018200107-euyzteb",+ "Type": "NodeParagraph",+ "Properties": {+ "id": "20261018200107-euyzteb",+ "updated": "20261018200107"+ },+ "Children": [+ {+ "Type": "NodeText",+ "Data": "Ctrl(macOS では Command)を押しながらマウスの右ボタンでキャンバスをドラッグすると、キーボードフォーカスや閲覧状態を変えずに一時的に移動できます。その後も通常のホイール操作で文書をスクロールできます。表示ロック中は使えません。通常モードでは空白部分を左ボタンでドラッグしてもキャンバスは移動しません。手のひらツールでは左ボタンでのドラッグも使えます。"+ }+ ]+ },{"ID": "20260921105011-01k7syf","Type": "NodeTable",diff --git a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-hnu6o79/20240530101000-3qhz7br.sy b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-hnu6o79/20240530101000-3qhz7br.syindex 1d555d53f7..e35dc7ba62 100644--- a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-hnu6o79/20240530101000-3qhz7br.sy+++ b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-hnu6o79/20240530101000-3qhz7br.sy@@ -9,7 +9,7 @@"title": "書式要素","title-img": "background-color:#269;background-image: linear-gradient(white 2px, transparent 2px),linear-gradient(90deg, white 2px, transparent 2px),linear-gradient(rgba(255,255,255,.3) 1px, transparent 1px),linear-gradient(90deg, rgba(255,255,255,.3) 1px, transparent 1px);background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;background-position:-2px -2px, -2px -2px, -1px -1px, -1px -1px;","type": "doc",- "updated": "20261018163000"+ "updated": "20261018200107"},"Children": [{@@ -2090,7 +2090,7 @@"Properties": {"ID": "20240530101000-ch5e4vh","id": "20240530101000-1ev7xub",- "updated": "20261018163000"+ "updated": "20261018200107"},"Children": [{@@ -2129,12 +2129,12 @@"Type": "NodeParagraph","Properties": {"id": "20261018163000-bic9sbi",- "updated": "20261018163000"+ "updated": "20261018200107"},"Children": [{"Type": "NodeText",- "Data": "マインドマップ上のマウスホイールと 1 本指のスワイプは、初期状態では文書をスクロールします。デスクトップではマップをクリックするとキャンバスを操作できます。モバイルではツールバーの「手のひらツール」で 1 本指の移動を行い、ツールをオフにするとノードを選択・ドラッグ・編集できます。閲覧中でもノードをダブルタップすると編集できます。操作中は枠が強調表示され、ホイールと 1 本指のドラッグでキャンバスを移動します。移動範囲の端でも文書はスクロールしません。マップの外をクリックする、キーボードフォーカスを外に移す、またはキャンバス上で Esc を押すと閲覧に戻ります。全画面表示ではキャンバス操作を維持し、全画面表示を終了すると閲覧に戻ります。"+ "Data": "マインドマップ上のマウスホイールと 1 本指のスワイプは、初期状態では文書をスクロールします。デスクトップではマップをクリックするとキャンバスを操作できます。モバイルではツールバーの「手のひらツール」で 1 本指の移動を行い、ツールをオフにするとノードを選択・ドラッグ・編集できます。閲覧中でもノードをダブルタップすると編集できます。操作中は枠が強調表示され、ホイールまたはマウスの右ボタンを押したドラッグでキャンバスを移動します。手のひらツールでは左ボタンでのドラッグも使えます。通常モードでは空白部分を左ボタンでドラッグしてもキャンバスは移動しません。タッチ画面では操作中に 1 本指でキャンバスを移動できます。移動範囲の端でも文書はスクロールしません。マップの外をクリックする、キーボードフォーカスを外に移す、またはキャンバス上で Esc を押すと閲覧に戻ります。全画面表示ではキャンバス操作を維持し、全画面表示を終了すると閲覧に戻ります。"}]},@@ -2142,12 +2142,13 @@"ID": "20261018163000-qe8wgtd","Type": "NodeParagraph","Properties": {- "id": "20261018163000-qe8wgtd"+ "id": "20261018163000-qe8wgtd",+ "updated": "20261018200107"},"Children": [{"Type": "NodeText",- "Data": "キャンバス操作を開始しなくても、Ctrl(macOS では Command)を押しながらホイールを回すとポインターを中心に拡大・縮小でき、タッチ画面では 2 本指で拡大・縮小と移動ができます。これらのジェスチャーの後は、通常のスクロールをそのまま続けられます。保存された表示ロックは、引き続き編集、拡大・縮小、移動を無効にします。ロック解除後、必要に応じてキャンバス操作を開始してください。"+ "Data": "キャンバス操作を開始しなくても、Ctrl(macOS では Command)を押しながらホイールを回すとポインターを中心に拡大・縮小でき、同じキーを押しながらマウスの右ボタンでキャンバスをドラッグすると一時的に移動できます。一時的な移動ではキーボードフォーカスとノードの選択を保持します。タッチ画面では 2 本指で拡大・縮小と移動ができます。これらのジェスチャーは現在の閲覧状態またはキャンバス操作状態を保持します。保存された表示ロックは、引き続き編集、拡大・縮小、移動を無効にします。ロック解除後、必要に応じてキャンバス操作を開始してください。"}]},diff --git a/app/src/assets/scss/protyle/_mindmap-view.scss b/app/src/assets/scss/protyle/_mindmap-view.scssindex 6c9984b7ff..2607fcfe1a 100644--- a/app/src/assets/scss/protyle/_mindmap-view.scss+++ b/app/src/assets/scss/protyle/_mindmap-view.scss@@ -215,7 +215,6 @@&--active &__viewport,&.fullscreen:not(.mindmap-view--locked) &__viewport {touch-action: none;- cursor: grab;}&__canvas {diff --git a/app/src/protyle/render/listMindmap/model.test.ts b/app/src/protyle/render/listMindmap/model.test.tsindex 5c5edaa523..2ec0df584e 100644--- a/app/src/protyle/render/listMindmap/model.test.ts+++ b/app/src/protyle/render/listMindmap/model.test.ts@@ -2986,7 +2986,7 @@ const browserCases = async (sourceCode: string, css: string, taskSource: string,check.equal(host.querySelector(".mindmap-view__ghost"), null);panButton.click();check.equal(panButton.getAttribute("aria-pressed"), "false");- check.equal(getComputedStyle(panViewport).cursor, "grab");+ check.equal(getComputedStyle(panViewport).cursor, "default");check.ok(getComputedStyle(panNode).pointerEvents !== "none");single.zoomAt(2.5);check.equal(single.scale, 2.5, "manual zoom can still enlarge a small map");@@ -3089,6 +3089,75 @@ const browserCases = async (sourceCode: string, css: string, taskSource: string,panView.offsetX = readingTransform[1];panView.offsetY = readingTransform[2];panView.draw();+ scrollHost.contentEditable = "true";+ // 模拟主题允许选择预览文字,验证拖动画布仍不会启动浏览器文字划选。+ viewport.style.userSelect = "text";+ getSelection().removeAllRanges();+ const blankStart = {x: Math.round(readingBounds.left + 100), y: Math.round(readingBounds.top + 220)};+ const blankEnd = centerPoint(panHost.querySelector<HTMLElement>(`[data-mindmap-id="${panModel.root.id}"]`));+ await nativeInput([+ {type: "mouseMove", ...blankStart},+ {type: "mouseDown", ...blankStart, button: "left", clickCount: 1},+ {type: "mouseMove", ...blankEnd, button: "left"},+ {type: "mouseUp", ...blankEnd, button: "left", clickCount: 1},+ ]);+ check.equal(getSelection().toString(), "", "native canvas dragging does not select preview text in an editable document");+ check.deepEqual([panView.scale, panView.offsetX, panView.offsetY], readingTransform,+ "ordinary left dragging on blank canvas does not pan");+ panHost.dispatchEvent(new KeyboardEvent("keydown", {key: "Escape", bubbles: true}));+ viewport.style.removeProperty("user-select");+ scrollHost.contentEditable = "false";+ const reader = document.createElement("input");+ reader.value = "Document reading selection";+ reader.style.cssText = "position:fixed;top:0;left:0";+ document.body.append(reader);+ for (const modifier of ["control", "meta"]) {+ panView.setReadOnly(modifier === "meta");+ panView.selectNode(panModel.root.id);+ panView.inspector.hidden = true;+ reader.focus({preventScroll: true});+ reader.setSelectionRange(2, 8);+ await settle();+ const node = panHost.querySelector<HTMLElement>(`[data-mindmap-id="${panModel.root.id}"]`);+ const point = centerPoint(node);+ const end = {x: point.x + 30, y: point.y + 20};+ const before = [panView.offsetX, panView.offsetY];+ await nativeInput([+ {type: "mouseMove", ...point},+ {type: "mouseDown", ...point, button: "right", clickCount: 1, modifiers: [modifier]},+ {type: "mouseMove", ...end, button: "right", modifiers: [modifier]},+ {type: "mouseUp", ...end, button: "right", clickCount: 1, modifiers: [modifier]},+ ]);+ check.deepEqual([panView.offsetX, panView.offsetY], [before[0] + 30, before[1] + 20]);+ check.equal(panView.interactionActive, false, "temporary right dragging preserves reading mode");+ check.equal(document.activeElement, reader, "temporary right dragging does not steal document focus");+ check.deepEqual([reader.selectionStart, reader.selectionEnd], [2, 8]);+ check.equal(panView.getSelectedId(), panModel.root.id);+ let receivedWheel: WheelEvent;+ let scrollingFinished = false;+ viewport.addEventListener("wheel", event => receivedWheel = event, {once: true});+ scrollHost.addEventListener("scrollend", () => scrollingFinished = true, {once: true});+ await nativeInput([+ {type: "keyUp", keyCode: modifier === "control" ? "Control" : "Meta"},+ {type: "mouseMove", ...end, modifiers: []},+ {type: "mouseWheel", ...end, deltaX: 0, deltaY: -80, canScroll: true, modifiers: []},+ ]);+ const deadline = performance.now() + 1000;+ while ((!scrollHost.scrollTop || !scrollingFinished) && performance.now() < deadline) {+ await frame();+ }+ check.ok(scrollHost.scrollTop > 0, "ordinary wheel input still scrolls the document after temporary panning: " ++ JSON.stringify({modifier, point: end, target: document.elementFromPoint(end.x, end.y)?.className,+ wheel: receivedWheel && {ctrlKey: receivedWheel.ctrlKey, metaKey: receivedWheel.metaKey,+ defaultPrevented: receivedWheel.defaultPrevented}}));+ scrollHost.scrollTop = 0;+ await settle();+ panView.offsetX = readingTransform[1];+ panView.offsetY = readingTransform[2];+ panView.draw();+ }+ reader.remove();+ panView.setReadOnly(false);check.ok(Array.from(panHost.querySelectorAll(".mindmap-view__toolbar use")).every(icon => icon.getAttribute("xlink:href") !== "#iconEdit"), "canvas activation has no separate pencil button");const hand = panHost.querySelector<HTMLButtonElement>('[aria-label="cursorHand"]');@@ -4584,12 +4653,14 @@ app.whenReady().then(async () => {await win.webContents.debugger.sendCommand("Emulation.setEmulatedMedia", {media});});ipcMain.handle("mindmap-view-native-input", async (_event, events) => {+ win.webContents.focus();for (const event of events) {win.webContents.sendInputEvent(event);await new Promise(resolve => setTimeout(resolve, 20));}});ipcMain.handle("mindmap-view-native-touch", async (_event, events) => {+ win.webContents.focus();await win.webContents.debugger.sendCommand("Emulation.setTouchEmulationEnabled", {enabled: true, maxTouchPoints: 2});try {for (const event of events) {diff --git a/app/src/protyle/render/listMindmap/view.ts b/app/src/protyle/render/listMindmap/view.tsindex b69ded92db..7bfd13a4b7 100644--- a/app/src/protyle/render/listMindmap/view.ts+++ b/app/src/protyle/render/listMindmap/view.ts@@ -78,6 +78,7 @@ export interface ListMindmapViewOptions {interface PointerState {pointerId: number;rightButton?: boolean;+ pan?: boolean;id?: string;startX: number;startY: number;@@ -409,7 +410,7 @@ export class ListMindmapView {if (!this.options.host.contains(target)) {this.setInteractionActive(false);}- if (this.editingId && this.isPanTarget(event)) {+ if ((this.editingId || this.isTemporaryPan(event)) && this.isPanTarget(event)) {return;}if (this.summarySelecting && (this.viewport.contains(target) || this.summaryControls.contains(target))) {@@ -461,7 +462,7 @@ export class ListMindmapView {private activatePointer = (event: PointerEvent) => {const target = event.target as Element;if (target.closest(".mindmap-view") !== this.options.host ||- this.buttons.get("lock")?.contains(target)) {+ this.buttons.get("lock")?.contains(target) || this.isTemporaryPan(event)) {return;}if (event.pointerType !== "touch" || target.closest("button, input, select")) {@@ -2169,15 +2170,20 @@ export class ListMindmapView {}};+ private isTemporaryPan(event: PointerEvent) {+ return event.button === 2 && (event.ctrlKey || event.metaKey);+ }+public isPanTarget(event: PointerEvent) {const target = event.target as HTMLElement;- return !this.locked && !this.pinching && !this.summarySelecting && !this.relationFrom &&+ return !this.locked && !this.pinching && (event.button === 2 || !this.summarySelecting && !this.relationFrom) &&(event.pointerType !== "touch" || this.interactionActive || !!this.fullscreenMarker) &&(event.pointerType !== "touch" || event.isPrimary) && [0, 2].includes(event.button) &&this.viewport.contains(target) && target.closest(".mindmap-view") === this.options.host &&!target.closest("button, input, select, textarea, audio, video, iframe, .mindmap-view__node--editing") &&(this.panning || event.button === 2 ||- !target.closest(".mindmap-view__node, .mindmap-view__summary") && !this.findLine(event));+ event.pointerType === "touch" && !target.closest(".mindmap-view__node, .mindmap-view__summary") &&+ !this.findLine(event));}private pointerDown = (event: PointerEvent) => {@@ -2199,8 +2205,12 @@ export class ListMindmapView {this.suppressPanContextMenu = event.button === 2;const element = target.closest<HTMLElement>(".mindmap-view__node");const id = element?.dataset.mindmapId;+ if (event.pointerType !== "touch") {+ // 画布接管指针时阻止浏览器启动文字划选,节点编辑器保留原生选区。+ event.preventDefault();+ }this.preparePointer(event);- if (this.editingId && this.isPanTarget(event)) {+ if ((this.editingId || this.isTemporaryPan(event)) && this.isPanTarget(event)) {// 平移只改变画布位置,保留节点编辑器及其文字选区。event.preventDefault();this.beginPointer(event);@@ -2292,12 +2302,13 @@ export class ListMindmapView {if (id) {this.selectNode(id);}- if (!this.editingId || id) {+ if ((!this.editingId || id) && !this.isTemporaryPan(event)) {this.options.host.focus({preventScroll: true});}this.pointer = {pointerId: event.pointerId,rightButton: event.button === 2,+ pan: this.panning || event.button === 2 || event.pointerType === "touch",id: !this.readOnly && id && !this.model.nodes.get(id)?.virtual ? id : undefined,startX: event.clientX,startY: event.clientY,@@ -2410,6 +2421,9 @@ export class ListMindmapView {}return;}+ if (!pointer.id && !pointer.pan) {+ return;+ }this.viewport.classList.add("mindmap-view__viewport--dragging");if (!pointer.id) {const bounded = this.boundedPan(pointer.x + dx, pointer.y + dy);diff --git a/app/src/protyle/render/listMindmap/viewportFocus.test.ts b/app/src/protyle/render/listMindmap/viewportFocus.test.tsindex 31fd754373..795c23c678 100644--- a/app/src/protyle/render/listMindmap/viewportFocus.test.ts+++ b/app/src/protyle/render/listMindmap/viewportFocus.test.ts@@ -8,7 +8,7 @@ const source = createSourceFile("view.ts", readFileSync("src/protyle/render/listScriptTarget.ES2021, true);const view = source.statements.find(item => isClassDeclaration(item) && item.name?.text === "ListMindmapView");assert.ok(view && isClassDeclaration(view));-const names = ["focusNode", "getToolbarBounds", "revealNode", "isPanTarget", "dismissControls", "pointerDown", "preparePointer", "beginPointer", "pointerUp"];+const names = ["focusNode", "getToolbarBounds", "revealNode", "isTemporaryPan", "activatePointer", "isPanTarget", "dismissControls", "pointerDown", "preparePointer", "beginPointer", "pointerUp"];const methods = view.members.filter(item => item.name && 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")} }@@ -28,7 +28,8 @@ const setup = () => {selectedId: "new", tooltip: {}, inspector: {hidden: true}, summaryControls: {hidden: true},toolbar: {hidden: false, querySelectorAll: (): unknown[] => []},nodeElements: new Map(), offsetX: 0, offsetY: 0,- interactionActive: true, setInteractionActive: () => {},+ interactionActive: true, setInteractionActive: (value: boolean) => target.interactionActive = value,+ buttons: new Map(),viewport: {contains: (element: unknown) => !!element, setPointerCapture: () => {},offsetWidth: 400, offsetHeight: 300,getBoundingClientRect: () => ({left: 0, top: 0, right: 400, bottom: 300, width: 400, height: 300})},@@ -219,9 +220,10 @@ test("bottom clearance preserves the node top below the toolbar when the node isassert.equal(100 + target.offsetY, 64);});-test("mouse, right-button and primary touch panning preserve the editing focus", () => {+test("hand-tool, right-button and primary touch panning preserve the editing focus", () => {for (const overrides of [{}, {button: 2}, {pointerType: "touch"}]) {const {target, event, focus, finished} = setup();+ target.panning = !Object.keys(overrides).length;const down = event("background", overrides);target.dismissControls(down);target.pointerDown(down);@@ -238,22 +240,69 @@ test("mouse, right-button and primary touch panning preserve the editing focus",}});+test("Ctrl and Meta right dragging preserves reading state, node selection and editor focus", () => {+ for (const key of ["ctrlKey", "metaKey"]) {+ for (const interactionActive of [false, true]) {+ const {target, event, focus, finished} = setup();+ target.interactionActive = interactionActive;+ const down = event("background", {button: 2, [key]: true});+ target.dismissControls(down);+ target.activatePointer(down);+ target.pointerDown(down);+ assert.equal(target.interactionActive, interactionActive);+ assert.equal(target.selectedId, "new");+ assert.equal(target.pointer.pan, true);+ assert.equal(focus(), "editor");+ assert.equal(finished(), 0);+ target.pointer.moved = true;+ target.pointerUp(down);+ assert.equal(focus(), "editor");+ assert.equal(finished(), 0);+ assert.equal(target.interactionActive, interactionActive);+ }+ const {target, event, finished} = setup();+ target.locked = true;+ target.interactionActive = false;+ const down = event("background", {button: 2, [key]: true});+ target.activatePointer(down);+ target.pointerDown(down);+ assert.equal(target.pointer, undefined, "temporary gestures cannot bypass a saved view lock");+ assert.equal(target.interactionActive, false);+ assert.equal(finished(), 0);+ for (const mode of ["relationFrom", "summarySelecting"]) {+ const {target, event, finished} = setup();+ target[mode] = mode === "relationFrom" ? "new" : true;+ const down = event("background", {button: 2, [key]: true});+ target.dismissControls(down);+ target.activatePointer(down);+ target.pointerDown(down);+ assert.equal(target.selectedId, "new");+ assert.equal(target[mode], mode === "relationFrom" ? "new" : true);+ assert.equal(target.pointer.pan, true);+ assert.equal(finished(), 0, "temporary panning does not finish a pending annotation");+ }+ }+});+test("a background click still finishes editing while a canceled drag leaves it active", () => {const {target, event, focus, finished} = setup();const down = event();target.pointerDown(down);target.pointerUp(down);- assert.equal(finished(), 1);+ assert.equal(finished(), 2);assert.equal(focus(), "canvas");target.editingId = "new";+ target.panning = true;target.pointerDown(event());target.cancelPointer();assert.equal(target.editingId, "new");- assert.equal(finished(), 1);+ assert.equal(finished(), 2);});test("nodes, controls, nested maps, lines and non-pan modes retain their own interactions", () => {const {target, event} = setup();+ assert.equal(target.isPanTarget(event()), false, "ordinary left dragging cannot pan the background");+ assert.equal(target.isPanTarget(event("background", {pointerType: "touch"})), true);for (const kind of [".mindmap-view__node", "button", ".mindmap-view__node--editing", ".mindmap-view__summary"]) {assert.equal(target.isPanTarget(event(kind)), false, kind);}diff --git a/app/src/protyle/render/listMindmap/wheel.test.ts b/app/src/protyle/render/listMindmap/wheel.test.tsindex f35c31a30d..b069d7ced4 100644--- a/app/src/protyle/render/listMindmap/wheel.test.ts+++ b/app/src/protyle/render/listMindmap/wheel.test.ts@@ -165,7 +165,7 @@ test("active mobile touch panning retains visible content without scrolling the["clipped", {x: 600, y: 901, width: 100, height: 99}],]);const document = {scrollTop: 0};- target.pointer = {pointerId: 1, x: 0, y: 0, startX: 100, startY: 100};+ target.pointer = {pointerId: 1, pan: true, x: 0, y: 0, startX: 100, startY: 100};target.viewport.classList = {add: () => {}};target.options = {host: {closest: () => document}};target.setHoveredLine = () => {};