Hi,
We are evaluating the gojs library by trying to integrate it with Oracle JET
When we try to do so we are facing the below issues.
We are using the following cdn in index.html
<script src="https://unpkg.com/gojs/release/go-debug.js"></script>
In our Oracle Jet component,
We created a div and when we try to access that particular div using the below script
script:
var myDiagram = new go.Diagram("myDiagramDiv");
Html:
<div id="myDiagramDiv" style="width:400px; height:150px; background-color: #DAE4E4;"></div>
The whole code looks like this,
import { h, Fragment } from "preact";
declare global {
interface Window {
go: any;
}
}
export function GoJsEval() {
const go = window.go;
var myDiagram = new go.Diagram("test")
return (
<div
id="test"
style="width:400px; height:150px; background-color: #DAE4E4;"
></div>
);
}
We are not able to access the div using the id and we are getting the below error:
.js:13 Uncaught (in promise) Error: Invalid DIV id; could not get element with id: test
at C (go.js:13:71)
at vi (go.js:604:284)
at new Q (go.js:591:400)
at _.GoJsEval [as constructor] (goJsEval.tsx:28:19)
at _.N [as render] (index.js:518:14)
at I (index.js:181:12)
at w (children.js:137:3)
at I (index.js:198:4)
at w (children.js:137:3)
at z (index.js:404:4)
Our requirement is to create a topology viewer that describes the architecture diagrams.
Can anyone help us on evaluating the GoJs library with Oracle Jet Framework by resolving the above errors and create a toplology viewer as mentioned above?