Hi
From your code snippets the creation sequence is not clear to me.
I am using typescript, angular and jointjs and this is my structure/sequence, the comparison might help.
I have an angular controller for the div that will contain the graph (call it mainView).
<div id="mainView" ng-controller="PatchBay.NodeGraphController">
I have an angular service (JointJsEditor) that contains the editor behaviour and this service is injected into the NodeGraphController.
So when NodeGraphController gets created JointJsEditor gets created before it.
In the constructor for JointJsEditor I call a createGraphView method,
this.graphView = new joint.dia.Paper({
el: $('#mainView'),
width: $('#mainView').width(),
height: $('#mainView').height(),
gridSize: 1,
model: this.graphModel
});
which creates an instance of Paper having a reference to $(‘#mainview’) passed to el.
Regards
Aidan
--
---
You received this message because you are subscribed to the Google Groups "JointJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jointjs+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.