Skip to content

Commit 2243ca8

Browse files
Jonathan ZakJonathan Zak
authored andcommitted
Get the post message working again
1 parent 3c9e48c commit 2243ca8

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/views/cytoscape/media/explain.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
// const vscode = acquireVsCodeApi();
44
console.log("IN EXPLAIN.JS!!!")
55
// @ts-ignore
6+
const vscode = window.acquireVsCodeApi()
7+
// @ts-ignore
68
const cy = cytoscape({
79
container: document.getElementById("diagramContainer"),
810
// @ts-ignore
@@ -46,10 +48,11 @@ const cy = cytoscape({
4648
// Add click event to show alert for nodes
4749
cy.on("tap", "node", function (evt) {
4850
const id = evt.target.id();
49-
// vscode.postMessage({
50-
// command: 'selected',
51-
// nodeId: id
52-
// });
51+
// @ts-ignore
52+
vscode.postMessage({
53+
command: 'selected',
54+
nodeId: id
55+
});
5356
});
5457

5558
const getCodiconClass = (label) => {

0 commit comments

Comments
 (0)