- Model | Graph switch on main.archify (Diagram | Graph on diagram pages, narrowed to that diagram) - union graph of every element and connection, registry and inline, built from the model index - query box: text, type:, diagram:, decision:, uses:, near:, from: to:, unused, shared, -shared - side panel per element and connection with diagrams, registry line and decisions one click away - legend chips, Fit, Layout, Labels, Export PNG; Cytoscape.js bundled as dist/graph.js - command Archify | Open Model Graph; integration check; unit tests for graph and queries
21 lines
940 B
TypeScript
21 lines
940 B
TypeScript
import * as vscode from 'vscode';
|
|
|
|
/** Folder of the bundled webview scripts; webviews may load files from it. */
|
|
export function viewerRoots(extensionUri: vscode.Uri): vscode.Uri[] {
|
|
return [vscode.Uri.joinPath(extensionUri, 'dist')];
|
|
}
|
|
|
|
/** Page option that adds the 3D viewer to an Archify page. */
|
|
export function viewer3dOption(webview: vscode.Webview, extensionUri: vscode.Uri): { scriptUri: string; defaultView: '2d' | '3d' } {
|
|
const defaultView = vscode.workspace.getConfiguration('archify').get<string>('defaultView', '2d') === '3d' ? '3d' : '2d';
|
|
return {
|
|
scriptUri: webview.asWebviewUri(vscode.Uri.joinPath(extensionUri, 'dist', 'viewer3d.js')).toString(),
|
|
defaultView,
|
|
};
|
|
}
|
|
|
|
/** The Graph page script (a webview URI). */
|
|
export function graphScriptUri(webview: vscode.Webview, extensionUri: vscode.Uri): string {
|
|
return webview.asWebviewUri(vscode.Uri.joinPath(extensionUri, 'dist', 'graph.js')).toString();
|
|
}
|