Argument error in CopiedLayoutGraph
bpetridean opened this issue · 3 comments
this.copiedLayoutGraph = new yfiles.layout.CopiedLayoutGraph(adapter)
CopiedLayoutGraph
constructor requires as 1st param a LayoutGraph
type and LayoutGraphAdapter
is not one.
In order to fix it use createCopiedLayoutGraph
method defined in scope of LayoutGraphAdapter
class as below:
this.copiedLayoutGraph = adapter.createCopiedLayoutGraph()
Worth mentioning: the above is oly visible when runtime type information is enabled; e.g. yfiles-typeinfo.js
is also loaded
Thanks for the info. Indeed this is a bug in the demo, because it is using an unofficial API. That's why it does work without the typeinfo.js - in this case the (working) internal API is used and no one is there to complain about the undocumented/illegal access. I wonder how this slipped through - obviously the testers only tested the internal version and the final version, but not the "intermediate developer" version. I just checked and the code for the upcoming 2.2 release has been fixed in this regard, already. Thanks again for reporting!
Fixed in the 2.2 release: