Fix graph node activation
This commit is contained in:
parent
4c82e1643d
commit
8ac4fe2a67
13 changed files with 65 additions and 21 deletions
|
|
@ -16,7 +16,7 @@ from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
|
|||
from .errors import DocForgeError
|
||||
from .index import APPLICATION_ID, INDEX_SCHEMA_VERSION, ProjectIndex, re_tokenize
|
||||
|
||||
VISUALIZATION_TEMPLATE = "graph-browser@3"
|
||||
VISUALIZATION_TEMPLATE = "graph-browser@4"
|
||||
DEFAULT_EDGE_LIMIT = 100
|
||||
MAX_EDGE_LIMIT = 400
|
||||
|
||||
|
|
@ -695,6 +695,7 @@ _GRAPH_BROWSER_HTML = r"""<!doctype html>
|
|||
position: absolute; inset: 0; display: grid; place-items: center;
|
||||
color: var(--muted); pointer-events: none;
|
||||
}
|
||||
.empty[hidden] { display: none; }
|
||||
.detail-head { display: flex; align-items: start; gap: 10px; }
|
||||
.detail-head h2 { margin: 0; font-size: 18px; overflow-wrap: anywhere; }
|
||||
.badge {
|
||||
|
|
@ -1120,7 +1121,6 @@ _GRAPH_BROWSER_HTML = r"""<!doctype html>
|
|||
viewport: {...state.viewport},
|
||||
moved: false,
|
||||
};
|
||||
svg.setPointerCapture(event.pointerId);
|
||||
});
|
||||
$("graph").addEventListener("pointermove", (event) => {
|
||||
const pointer = state.pointer;
|
||||
|
|
@ -1133,6 +1133,7 @@ _GRAPH_BROWSER_HTML = r"""<!doctype html>
|
|||
if (!pointer.moved && Math.hypot(deltaX, deltaY) < 4) return;
|
||||
pointer.moved = true;
|
||||
state.suppressClick = true;
|
||||
if (!svg.hasPointerCapture(event.pointerId)) svg.setPointerCapture(event.pointerId);
|
||||
svg.closest(".canvas").classList.add("dragging");
|
||||
state.viewport = {
|
||||
...pointer.viewport,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue