I’m not really sure what’s going on there. On the surface I cant see a reason why that would fail. It might be down to a timing issue where ready() is called before everything is done, or it might be a scoping issue where the init() method doesn’t find the HTML for that same element. Without debugging it I can’t really help one way or another…
Personally I’d put a breakpoint in init() just before that call and check that the DOM has been built correctly and all imports work fine. If that works, then simplifying the code to just get the correct element and outputting something to test if the lookup by ID works. If that works too, then it’s an issue with the 3rd party lib that it can’t find the element, maybe because of web component related shenanigans.
is defined inside the shadow root of the PolymerTemplate.
So if you call document.getElementById(myDiagramDiv) it’s not found (=null). MindMap probably use this to retrieve the element.
Inside polymer template you can retrieve it using:
var myDiv = this.$.myDiagramDiv;
//if (window.goSamples) goSamples(); // init for these samples -- you don't need to call this
var $ = go.GraphObject.make;
this.myDiagram =
$(go.Diagram, myDiv,
.....
Hi Thomas and Jean Christophe
Even with mvn clean install same problem.
The Jean Christophe’s solution is OK. I can go ahead, I will have other problems but I did a huge step with your help.
I know very well Java, Eclipse but close to nothing with JS and I am not found of it. It’s for this reason that I want work with Vaadin, because I expect to be able to put the JS script in boxes!!! I am still fighting with it but I go ahead…