@mutt_1924 wrote:
While implementing the basic AngularJS demo from the GoJS samples inside of angular-ui tabs, I am running into an issue where the diagram gets rendered, but it is stuck in the top right corner of the canvas, instead of being centered as per
initialContentAlignment: go.Spot.Center. I don't know why the alignment does not center.When logging out the
diagram.contentAlignmentinside thescope.$watch("model", function(newmodel) {, thexand theycoordinates come out asNaN.To fix - and this seems like an utter hack - adding this check inside the
watchseems to help.if (isNaN(diagram.contentAlignment.x)) { diagram.contentAlignment = go.Spot.Center; }
Posts: 2
Participants: 2