Hi,
I’m having two problems:
—PROBLEM 1—
I recently started using go-debug and came across an unexplainable message.
When loading a model i get this message:
Change not within a transaction: !d points: Link#1650(55e97ba1c9942a0a287cebf5) old: List(Point)#1697 new: List(Point)#1737
I am setting points on the links, and have a binding to them, so i thought i might have made an error somewhere. I spent the day trying to solve the message but with no result. I deleted the bindings and points properties (in data) of the links but still get the message. Could this be a bug in gojs?
—PROBLEM 2—
I wanted to have my nodes act as a group, so i changed my nodetemplate to a group template. all is working well, only the links started acting differently after the change.The links are connected to the node (group) with ports.
Here is what my grouptemplate looks like:
$(go.Group, 'Table', {
locationObjectName: 'BODY',
selectionObjectName: 'BODY',
resizable: true,
resizeObjectName: 'BODY',
dragComputation: _this.get('objectDragged'),
mouseDrop: //logic that binds or unbinds an object to the group
containingGroupChanged: //logic to change the appearance and location of the object
mouseOver: //logic to set some variables on the object
mouseDragEnter: //logic to change the appearance of the object
mouseDragLeave: //logic to change the appearance of the object
memberValidation: //logic to validate member
memberAdded: //logic to change the appearance of the object, and appearance and location of the memberparts
memberRemoved: //logic to change the appearance of the object, and appearance and location of the memberparts
},
new go.Binding('location', 'loc', go.Point.parse).makeTwoWay(go.Point.stringify),
new go.Binding('cursor'),
new go.Binding('groupable', 'group', function(v) { return !v; }),
$(go.Panel, 'Table', {
row: 1, column: 1, name: 'BODY', stretch: go.GraphObject.Fill, minSize: new go.Size(10,10), width: 206 },
new go.Binding('desiredSize', 'size', function(v) { if (v && v !== '0 0') { return go.Size.parse(v); } }).makeTwoWay(go.Size.stringify),
new go.Binding('background', 'color'),
$(go.Panel, 'Auto', { row: 1, column: 1, stretch: go.GraphObject.Fill, },
$(go.TextBlock, { margin: 10, wrap: go.TextBlock.WrapFit },
new go.Binding('text', 'object_title'),
new go.Binding('stroke', 'font'))
), //end of the main panel
$(go.Panel, 'Vertical', { row: 1, column: 2, stretch: go.GraphObject.Fill, width: 18, margin: 2 },
$(go.Picture, new go.Binding('source', 'source'))
) // end of right panel
), //end of body, consists of a main panel containing a shape and a textblock and a small panel located right for the image
this.getPortTemplate($, 'top'),
this.getPortTemplate($, 'bottom'),
this.getPortTemplate($, 'left'),
this.getPortTemplate($, 'right')
); // end of nodeTemplate
The problem i’m having is when i resize a node, the links will change their location, and are not connected anymore to the ports…
also i’m getting a lot of these errors when loading:
Uncaught Error: Link.setPointAt:x must be a real number type, and not NaN or Infinity: NaN
and also these:
Uncaught Error: Non-real measuredBounds has been set. Object Shape(None)#37423, measuredBounds: Rect(-6,-6,NaN,NaN)