Do layout behaviour is changed

self.canvasContext.diagram.layout.doLayout = function (coll) {, coll);
self.createBoundary(); // this method is creating boundary over all the nodes

In previous version(1.4.8) it was working fine but in latest version it the boudary node is not coming on right place.

I have created the boundary node by calculating the left most,top most, bottom most and right most nodes positions and in previous version the position of the boundary coming perfect but in new version it is not coming on right position. the height and width is correct but the both nodes position is not correct.

Could you provide more information so that we can help you? What does createBoundary actually do? Does the layout still work reasonably well? (Note that exact positioning and sizing is not always guaranteed.)

You might want to override LayeredDigraphLayout | GoJS API to get boundary information. Or just call Diagram.computePartsBounds after the layout has finished.

//draw the rectangle on canvas
            createBoundary: function () {
                if (!this.collection) {
                if (this.collection.length === 1) {

                var operationDiagrams = this.collection.models,
                    requieredBoundariesCount = operationDiagrams.length,
                    boundariesCount = self.countBoundaries(),
                    recreateBoundaries =  boundariesCount !== requieredBoundariesCount,
                    index, operationDiagramModel, newKey, id, odId, data, cord, boundary, rectangleShape;

                if (recreateBoundaries) {

                for (index = 0; index < operationDiagrams.length; index++) {
                    self.canvasContext.diagram.startTransaction("Set Model");
                    operationDiagramModel = operationDiagrams[index];
                    newKey = this.getNewNodeKey();
                    id = operationDiagramModel.get("id");
                    odId = operationDiagramModel.cid;
                    if (id && id > 0) {
                        odId = id;
                    data = self.getOdNodes(operationDiagramModel);
                    cord = self.getCordinatesFromNodes(data.nodes, data.isDCNodeExists, odId);

                    boundary = null;
                    if (recreateBoundaries) { 
                        //add new boundary
                            key: newKey, category: Enum.nodeType.boundaryNode, text: "text " + newKey, odID: odId,
                            boundaryColor: this.nodeUtil.getCSSStyleValue("OD-inactive-boundary") 

                        boundary = self.canvasContext.diagram.findNodeForKey(newKey);
                    else {
                        boundary = self.findBoundaryByOdId(odId);
                    if (boundary) {
                        rectangleShape = boundary.findObject("rectangleShape");
                        if (rectangleShape) {
                                width: cord.width, height: cord.height

                        console.log(cord.x + "<--->" + cord.y);   
                        boundary.setProperties({ position: new go.Point(cord.x, cord.y) });
                        //at this point the position is correct for this boundary node but after animation is finished the position is being changed
                    self.canvasContext.diagram.commitTransaction("Set Model");
                if (self.canvasContext.currentNode && !self.currentActiveODId) {
                    self.currentActiveODId =;

in this method i am creating node if needed else i am repositioning the existing node but when i am repositioning it, at the moment it is showing the current position in console but after animation is finished its position is being changed i don’t know why this is happening.

Ah, so are you saying there is a problem with layout animation? If you set:

    "animationManager.isEnabled": false

in your Diagram initialization, does the problem go away?

I tried that too but still the position is being changed internally in gojs lib.

There really isn’t enough information for us to go on. Can you provide us with a way to reproduce the problem?