WalterNorthwoods

WalterNorthwoods

Member Since 6 years ago

@NorthwoodsSoftware , Nashua NH USA UTC-05:00

Experience Points
12
follower
Lessons Completed
0
follow
Lessons Completed
1
stars
Best Reply Awards
0
repos

58 contributions in the last year

Pinned
Activity
Nov
23
5 days ago
Activity icon
created tag
createdAt 5 days ago
Activity icon
published release 2.1.54

WalterNorthwoods in NorthwoodsSoftware/GoJS create published release 2.1.54

createdAt 5 days ago
push

WalterNorthwoods push NorthwoodsSoftware/GoJS

WalterNorthwoods
WalterNorthwoods

2.1.54

Changes for 2.1.54

  • Fixed Diagram.viewSize when setting it to a real value and then later setting it back to a NaN value.
  • As with 2.1.52, fixed more scenarios with custom animations improperly adding state to the AnimationManager.defaultAnimation.
  • Fixed rare cases of LayeredDigraphLayout trying to get the "centerX" property of a null vertex.

commit sha: 91136c2ee971725c66b6a4990d6e2aca5ffc2c97

push time in 5 days ago
Nov
22
6 days ago
Activity icon
issue

WalterNorthwoods issue comment NorthwoodsSoftware/GoJS

WalterNorthwoods
WalterNorthwoods

Cannot read properties of null (reading 'centerX')

Hello, I have this data

[{ key: "1", n: "1", s: "M"   ,  ux:"2"   },
{ key: "2", n: "2", s: "F"    ,  vir:"1"   },
{ key: "8", n: "8", s: "F"  ,  vir:"17" , m: "2" , f: "1"},
{ key: "17", n: "17", s: "M"  ,  ux:"8"    }]

and Im getting error here

image

because id 17 was not created.

image

I use code from your example https://github.com/NorthwoodsSoftware/GoJS/blob/master/samples/genogram.html

Can you please help to fix it?

Problem is in { key: "8", n: "8", s: "F" , vir:"17" , m: "2" , f: "1"},

Because it works with { key: "8", n: "8", s: "F" , vir:"17" },

also it works if I change ID to int. But with full data

[{ key: 1, n: "1", s: "M"   ,  ux:[2,12,90,160]   },
{ key: 2, n: "2", s: "F"    ,  vir:1  },
{ key: 8, n: "8", s: "F" , m: 2 , f: 1  ,  vir:17  },
{ key: 12, n: "12", s: "F"    ,  vir:[1,19,109,164]  },
{ key: 13, n: "13", s: "F" , m: 12 , f: 1  ,  vir:[19,63,72,101,109,163]  },
{ key: 15, n: "15", s: "F" , m: 12 , f: 1  ,  vir:[19,166]  },
{ key: 17, n: "17", s: "M"   ,  ux:8   },
{ key: 19, n: "19", s: "M" , m: 8 , f: 17 ,  ux:[12,13,15,35,76,88,116]   },
{ key: 27, n: "27", s: "M" , m: 8 , f: 17 ,  ux:32   },
{ key: 32, n: "32", s: "F" , m: 13 , f: 19  ,  vir:27  },
{ key: 35, n: "35", s: "F" , m: 15 , f: 19  ,  vir:[19,63,101,163]  },
{ key: 63, n: "63", s: "M"   ,  ux:[13,35]   },
{ key: 72, n: "72", s: "M"   ,  ux:13   },
{ key: 76, n: "76", s: "F" , m: 13 , f: 72  ,  vir:[19,101]  },
{ key: 88, n: "88", s: "F"    ,  vir:[19,101]  },
{ key: 90, n: "90", s: "F" , m: 88 , f: 19  ,  vir:[1,101]  },
{ key: 101, n: "101", s: "M"   ,  ux:[13,35,76,88,90]   },
{ key: 109, n: "109", s: "M"   ,  ux:[12,13]   },
{ key: 111, n: "111", s: "F" , m: 13 , f: 109  ,  vir:117  },
{ key: 116, n: "116", s: "F" , m: 88 , f: 101  ,  vir:[19,164]  },
{ key: 117, n: "117", s: "M" , m: 88 , f: 101 ,  ux:111   },
{ key: 153, n: "153", s: "F" , m: 90 , f: 1  ,  vir:164  },
{ key: 160, n: "160", s: "F" , m: 88 , f: 101  ,  vir:1  },
{ key: 163, n: "163", s: "M" , m: 88 , f: 101 ,  ux:[13,35]   },
{ key: 164, n: "164", s: "M"   ,  ux:[12,116,153,223]   },
{ key: 166, n: "166", s: "M" , m: 116 , f: 164 ,  ux:15   },
{ key: 223, n: "223", s: "F"    ,  vir:164  }]

Im gettig error Cannot read properties of null (reading 'centerX')

image

http://jsfiddle.net/Risay/ehcyvp50/

WalterNorthwoods
WalterNorthwoods

Thanks for providing a reproducible case. The bug fix will be in version 2.1.54, which should be coming out pretty soon.

Activity icon
issue

WalterNorthwoods issue NorthwoodsSoftware/GoJS

WalterNorthwoods
WalterNorthwoods

Cannot read properties of null (reading 'centerX')

Hello, I have this data

[{ key: "1", n: "1", s: "M"   ,  ux:"2"   },
{ key: "2", n: "2", s: "F"    ,  vir:"1"   },
{ key: "8", n: "8", s: "F"  ,  vir:"17" , m: "2" , f: "1"},
{ key: "17", n: "17", s: "M"  ,  ux:"8"    }]

and Im getting error here

image

because id 17 was not created.

image

I use code from your example https://github.com/NorthwoodsSoftware/GoJS/blob/master/samples/genogram.html

Can you please help to fix it?

Problem is in { key: "8", n: "8", s: "F" , vir:"17" , m: "2" , f: "1"},

Because it works with { key: "8", n: "8", s: "F" , vir:"17" },

also it works if I change ID to int. But with full data

[{ key: 1, n: "1", s: "M"   ,  ux:[2,12,90,160]   },
{ key: 2, n: "2", s: "F"    ,  vir:1  },
{ key: 8, n: "8", s: "F" , m: 2 , f: 1  ,  vir:17  },
{ key: 12, n: "12", s: "F"    ,  vir:[1,19,109,164]  },
{ key: 13, n: "13", s: "F" , m: 12 , f: 1  ,  vir:[19,63,72,101,109,163]  },
{ key: 15, n: "15", s: "F" , m: 12 , f: 1  ,  vir:[19,166]  },
{ key: 17, n: "17", s: "M"   ,  ux:8   },
{ key: 19, n: "19", s: "M" , m: 8 , f: 17 ,  ux:[12,13,15,35,76,88,116]   },
{ key: 27, n: "27", s: "M" , m: 8 , f: 17 ,  ux:32   },
{ key: 32, n: "32", s: "F" , m: 13 , f: 19  ,  vir:27  },
{ key: 35, n: "35", s: "F" , m: 15 , f: 19  ,  vir:[19,63,101,163]  },
{ key: 63, n: "63", s: "M"   ,  ux:[13,35]   },
{ key: 72, n: "72", s: "M"   ,  ux:13   },
{ key: 76, n: "76", s: "F" , m: 13 , f: 72  ,  vir:[19,101]  },
{ key: 88, n: "88", s: "F"    ,  vir:[19,101]  },
{ key: 90, n: "90", s: "F" , m: 88 , f: 19  ,  vir:[1,101]  },
{ key: 101, n: "101", s: "M"   ,  ux:[13,35,76,88,90]   },
{ key: 109, n: "109", s: "M"   ,  ux:[12,13]   },
{ key: 111, n: "111", s: "F" , m: 13 , f: 109  ,  vir:117  },
{ key: 116, n: "116", s: "F" , m: 88 , f: 101  ,  vir:[19,164]  },
{ key: 117, n: "117", s: "M" , m: 88 , f: 101 ,  ux:111   },
{ key: 153, n: "153", s: "F" , m: 90 , f: 1  ,  vir:164  },
{ key: 160, n: "160", s: "F" , m: 88 , f: 101  ,  vir:1  },
{ key: 163, n: "163", s: "M" , m: 88 , f: 101 ,  ux:[13,35]   },
{ key: 164, n: "164", s: "M"   ,  ux:[12,116,153,223]   },
{ key: 166, n: "166", s: "M" , m: 116 , f: 164 ,  ux:15   },
{ key: 223, n: "223", s: "F"    ,  vir:164  }]

Im gettig error Cannot read properties of null (reading 'centerX')

image

http://jsfiddle.net/Risay/ehcyvp50/

Nov
5
3 weeks ago
Activity icon
published release 2.1.53

WalterNorthwoods in NorthwoodsSoftware/GoJS create published release 2.1.53

createdAt 3 weeks ago
Activity icon
created tag
createdAt 3 weeks ago
push

WalterNorthwoods push NorthwoodsSoftware/GoJS

WalterNorthwoods
WalterNorthwoods

2.1.53

  • Fixed Binding.ofModel binding when there is no Diagram and thus no Model to just ignore the binding.
  • Fixed a regression in Diagram.makeSVG from 2.1.49 when using a Panel.Spot with Panel.isClipping set to true, where some elements would get grouped and positioned incorrectly.
  • Fixed Model.toJSON output when object keys contained unescaped double-quote characters.
  • Fixed some Shape Geometry intersections (such as with Link connections) when the Shape's Geometry contained small and flat beziers.
  • Fixed collapsed Parts incorrectly causing their Groups to remeasure, which may have caused Group's connected Links to re-route.

commit sha: 7af4c3d0d7b4b328e3d6adc6d50044197624df4f

push time in 3 weeks ago
Oct
19
1 month ago
Activity icon
issue

WalterNorthwoods issue NorthwoodsSoftware/GoJS

WalterNorthwoods
WalterNorthwoods

DimensioningLink extension not binding points

Hi,

I found a bug in the DimensioningLink extension, when you use it with binding points to save the current position after (reshapable edits ),

$(DimensioningLink,{reshapable: true,resegmentable:true}, new go.Binding("fromSpot", "fromSpot", go.Spot.parse), new go.Binding("toSpot", "toSpot", go.Spot.parse), new go.Binding("direction"), new go.Binding("extension"), new go.Binding("inset"), now if I remove or add a new link with ( committing transitions ), I lose the positions of links

Activity icon
issue

WalterNorthwoods issue comment NorthwoodsSoftware/GoJS

WalterNorthwoods
WalterNorthwoods

DimensioningLink extension not binding points

Hi,

I found a bug in the DimensioningLink extension, when you use it with binding points to save the current position after (reshapable edits ),

$(DimensioningLink,{reshapable: true,resegmentable:true}, new go.Binding("fromSpot", "fromSpot", go.Spot.parse), new go.Binding("toSpot", "toSpot", go.Spot.parse), new go.Binding("direction"), new go.Binding("extension"), new go.Binding("inset"), now if I remove or add a new link with ( committing transitions ), I lose the positions of links

WalterNorthwoods
WalterNorthwoods

That seems to be a bug in the DimensioningLink extension. Try removing the call to updateTargetBindings() in the computePoints method. I don't know why that call is there.

Oct
13
1 month ago
Activity icon
created tag
createdAt 1 month ago
Activity icon
created tag
createdAt 1 month ago
Activity icon
published release 2.1.52

WalterNorthwoods in NorthwoodsSoftware/GoJS create published release 2.1.52

createdAt 1 month ago
push

WalterNorthwoods push NorthwoodsSoftware/GoJS

WalterNorthwoods
WalterNorthwoods

2.1.52

Changes for 2.1.52

  • Fixed animations incorrectly resetting some link routes.
  • Fixed custom animations improperly adding state to the AnimationManager.defaultAnimation.
  • Fixed a regression in 2.1.51 where un-modeled parts containing Images, that are added before a model is set, may fail to load.
  • Fixed a regression from 2.1.50 when Picture.errorFunction was used to modify the Picture.source or Picture.element, which would cause a "Collection was modified during iteration" error.

commit sha: d6fd464f9d49530406810c29832b6fe3d962179f

push time in 1 month ago
Oct
8
1 month ago
Activity icon
issue

WalterNorthwoods issue comment NorthwoodsSoftware/GoJS

WalterNorthwoods
WalterNorthwoods

Group's location that have priority over Node's location

I am developing a GoJS Diagram based on the Leaflet example. That means that redraw and updateAllTargetBindings methods are included (on any move event). My diagram though has groups that expand/collapses their placeholders with a certain zoom level.

As I looked up on GoJS forum, when groups have Placeholders their locations are ignored in favor of nodes locations. This logic causes an odd behaviour that when the zoom in or zoom out happens, the redraw() method causes the group location binding be considered for a brief moment and then node location binding takes place.

So you can imagine that in this example the group Lat-Long is more important than the node Lat-Long, but the Placeholder is still very important because it can be dinamically resized depending on the number of children nodes.

With group location having priority, the developer doesn't have to assign any location to a node. So my propose here is to create a property that makes group's location prevail over node's location.

WalterNorthwoods
WalterNorthwoods

If you have a design where each Node is only (at most) a member of a single collection Part, then you can use Groups. That Shared States sample is unusual in that it implements a design where nodes can be members of multiple collection Parts.

If you are using a Group and you want the group's size and location to depend on the union of the bounds of its member Parts, then use a Placeholder. Otherwise don't use a Placeholder, and you can do anything you want with the size and location of the Group.

Oct
4
1 month ago
Activity icon
created tag
createdAt 1 month ago
Activity icon
published release 2.1.51

WalterNorthwoods in NorthwoodsSoftware/GoJS create published release 2.1.51

createdAt 1 month ago
push

WalterNorthwoods push NorthwoodsSoftware/GoJS

WalterNorthwoods
WalterNorthwoods

2.1.51

  • The TextEditingTool, when the user has entered an invalid text string, has always called any TextBlock.errorFunction and then continued showing the text editor so that the user could fix their text entry. The TextEditingTool.doError method now calls any TextBlock.errorFunction and also calls HTMLInfo.show on the TextEditingTool.currentTextEditor. This will allow an override of TextEditingTool.doError not to continue showing the editor. If you have not overridden that method, which was new in 2.1, this change will not affect you.
  • Fixed Model.fromJson not to substitute instances of classes such as Point and Size when the Object's "class" property had a value that is "Point" or "Size". The property value must be what is produced by Model.toJson, which uses values such as "go.Point" or "go.Size". The documentation lists all of the substitution cases that Model.fromJson handles.
  • Fixed a regression from 2.1.43 which caused some links to animate routes incorrectly upon dragging.
  • Fixed loading Images used as a Picture.element.
  • Improved some AvoidsNodes routing of Links when connecting Nodes in different Groups and the Groups are not Group.avoidable.
  • Fixed using multiple license keys.

commit sha: 82a3a78b4808182a85697911b981d13ee62cd05e

push time in 1 month ago
Oct
2
1 month ago
Activity icon
issue

WalterNorthwoods issue NorthwoodsSoftware/GoJS

WalterNorthwoods
WalterNorthwoods

Group's location that have priority over Node's location

I am developing a GoJS Diagram based on the Leaflet example. That means that redraw and updateAllTargetBindings methods are included (on any move event). My diagram though has groups that expand/collapses their placeholders with a certain zoom level.

As I looked up on GoJS forum, when groups have Placeholders their locations are ignored in favor of nodes locations. This logic causes an odd behaviour that when the zoom in or zoom out happens, the redraw() method causes the group location binding be considered for a brief moment and then node location binding takes place.

So you can imagine that in this example the group Lat-Long is more important than the node Lat-Long, but the Placeholder is still very important because it can be dinamically resized depending on the number of children nodes.

With group location having priority, the developer doesn't have to assign any location to a node. So my propose here is to create a property that makes group's location prevail over node's location.

Activity icon
issue

WalterNorthwoods issue comment NorthwoodsSoftware/GoJS

WalterNorthwoods
WalterNorthwoods

Group's location that have priority over Node's location

I am developing a GoJS Diagram based on the Leaflet example. That means that redraw and updateAllTargetBindings methods are included (on any move event). My diagram though has groups that expand/collapses their placeholders with a certain zoom level.

As I looked up on GoJS forum, when groups have Placeholders their locations are ignored in favor of nodes locations. This logic causes an odd behaviour that when the zoom in or zoom out happens, the redraw() method causes the group location binding be considered for a brief moment and then node location binding takes place.

So you can imagine that in this example the group Lat-Long is more important than the node Lat-Long, but the Placeholder is still very important because it can be dinamically resized depending on the number of children nodes.

With group location having priority, the developer doesn't have to assign any location to a node. So my propose here is to create a property that makes group's location prevail over node's location.

WalterNorthwoods
WalterNorthwoods

The whole purpose of a Placeholder is to position and size the Group based on the group's members. If you want the position/location of a Group to be independent of its members, don't use a Placeholder. If you want the size to depend on the members somehow, implement it yourself. https://gojs.net/latest/intro/sizedGroups.html For a completely different scenario: https://gojs.net/latest/samples/sharedStates.html

Sep
30
1 month ago
Activity icon
issue

WalterNorthwoods issue comment NorthwoodsSoftware/GoJS

WalterNorthwoods
WalterNorthwoods

go.Model.fromJson corrupts nodeDataArray if nodeDataArray contains a property "class" with value "Size"

Parsing a model such as the following with go.Model.fromJson

go.Model.fromJson({
        "class": "GraphLinksModel",
        "nodeDataArray": [{
            "class": "Size",
            "customProp": "customValue",
            "key": -4,
            "loc": "450 900",
          }]
}).nodeDataArray[0]

returns an Object with missing properties but additional height and width properties: grafik

It looks like the nodeData is converted to a go.Size object.

WalterNorthwoods
WalterNorthwoods

OK, I'll treat this as a bug, in that Model.fromJson was never intended to substitute for example an instance of the Size class for an Object of the form { class: "Size", . . . }. Instead models have always written and read instances of Size in the form { class: "go.Size", . . . }.

I have also updated the documentation for both Model.toJson and Model.fromJson.

This will be in 2.1.51. Thanks for taking the trouble to report this problem.

Sep
29
1 month ago
Activity icon
issue

WalterNorthwoods issue NorthwoodsSoftware/GoJS

WalterNorthwoods
WalterNorthwoods

go.Model.fromJson corrupts nodeDataArray if nodeDataArray contains a property "class" with value "Size"

Parsing a model such as the following with go.Model.fromJson

go.Model.fromJson({
        "class": "GraphLinksModel",
        "nodeDataArray": [{
            "class": "Size",
            "customProp": "customValue",
            "key": -4,
            "loc": "450 900",
          }]
}).nodeDataArray[0]

returns an Object with missing properties but additional height and width properties: grafik

It looks like the nodeData is converted to a go.Size object.

Activity icon
issue

WalterNorthwoods issue comment NorthwoodsSoftware/GoJS

WalterNorthwoods
WalterNorthwoods

go.Model.fromJson corrupts nodeDataArray if nodeDataArray contains a property "class" with value "Size"

Parsing a model such as the following with go.Model.fromJson

go.Model.fromJson({
        "class": "GraphLinksModel",
        "nodeDataArray": [{
            "class": "Size",
            "customProp": "customValue",
            "key": -4,
            "loc": "450 900",
          }]
}).nodeDataArray[0]

returns an Object with missing properties but additional height and width properties: grafik

It looks like the nodeData is converted to a go.Size object.

WalterNorthwoods
WalterNorthwoods

That is intentional. From the API documentation, https://gojs.net/latest/api/symbols/Model.html#static-fromJson :

Most object classes cannot be serialized into JSON without special knowledge and processing at both ends. The toJson and Model.fromJson methods automatically do such processing for numbers that are NaN and for objects that are of class Point, Size, Rect, Margin, Spot, Brush (but not for brush patterns), and for Geometry. However, we recommend that you use Binding converters (static functions named "parse" and "stringify") to represent Points, Sizes, Rects, Margins, Spots, and Geometries as string values in your data, rather than as Objects. This makes the JSON text smaller and simpler and easier to read.

Sep
17
2 months ago
Activity icon
created tag
createdAt 2 months ago
Activity icon
published release 2.1.50

WalterNorthwoods in NorthwoodsSoftware/GoJS create published release 2.1.50

createdAt 2 months ago
push

WalterNorthwoods push NorthwoodsSoftware/GoJS

WalterNorthwoods
WalterNorthwoods

2.1.50

Changes for 2.1.50

  • Enhanced the LinkShiftingTool extension to support links that are only connected at one end.
  • Fixed CommandHandler.doKeyDown to support Robot.keyDown use of "F2" and "ContextMenu" keys.
  • Improved routing of AvoidsNodes links that have a "to" end segment with a direction that is a multiple of 45 (but not 90) degrees.
  • Fixed diagram not redrawing after images load in frameworks that use a shadow DOM, such as Angular.
  • If you call TextBlock.setBaseline or TextBlock.setUnderline outside of your diagram initialization, you should also call Diagram.redraw on all Diagrams.

commit sha: 19d4b89fc45fa649cd78125f27a736033d1de8b9

push time in 2 months ago
Sep
11
2 months ago
Activity icon
issue

WalterNorthwoods issue NorthwoodsSoftware/GoJS

WalterNorthwoods
WalterNorthwoods

CustomLink not working

I am converting dynamic node code to react js. I need to create a custom link for that. I ah getting two errors

  1. myDiagram.linkTemplate = $(CustomLink, // defined below { routing: go.Link.AvoidsNodes, corner: 4, curve: go.Link.JumpGap, reshapable: true, resegmentable: true, relinkableFrom: true, relinkableTo: true }, new go.Binding("points").makeTwoWay(), $(go.Shape, { stroke: "#2F4F4F", strokeWidth: 2 }) );

I this code "CustomLink" says this error

**Error: ** No overload matches this call. The last overload gave the following error. Argument of type '() => any' is not assignable to parameter of type 'ConstructorType<() => any>'. Type '() => any' provides no match for the signature 'new (...args: any[]): any'.

  1. function CustomLink():any{ go.Link.call(this); } In this code I am getting the error written below

Error: 'this' implicitly has type 'any' because it does not have a type annotation.ts

Because of these tow issues I can't move further. Someone suggested to create a separate class for Link. But I am not able to do it. Will any one has any example for that

CustomLink as a proper class in ES6, class CustomLink extends go.Link { } --- > Like this

Activity icon
issue

WalterNorthwoods issue comment NorthwoodsSoftware/GoJS

WalterNorthwoods
WalterNorthwoods

CustomLink not working

I am converting dynamic node code to react js. I need to create a custom link for that. I ah getting two errors

  1. myDiagram.linkTemplate = $(CustomLink, // defined below { routing: go.Link.AvoidsNodes, corner: 4, curve: go.Link.JumpGap, reshapable: true, resegmentable: true, relinkableFrom: true, relinkableTo: true }, new go.Binding("points").makeTwoWay(), $(go.Shape, { stroke: "#2F4F4F", strokeWidth: 2 }) );

I this code "CustomLink" says this error

**Error: ** No overload matches this call. The last overload gave the following error. Argument of type '() => any' is not assignable to parameter of type 'ConstructorType<() => any>'. Type '() => any' provides no match for the signature 'new (...args: any[]): any'.

  1. function CustomLink():any{ go.Link.call(this); } In this code I am getting the error written below

Error: 'this' implicitly has type 'any' because it does not have a type annotation.ts

Because of these tow issues I can't move further. Someone suggested to create a separate class for Link. But I am not able to do it. Will any one has any example for that

CustomLink as a proper class in ES6, class CustomLink extends go.Link { } --- > Like this

WalterNorthwoods
WalterNorthwoods

This is not an issue/bug/problem with the GoJS library or its documentation, so you should not be using GitHub Issues.

The use of function name() { ... } followed by go.Diagram.inherit(...) is old class-defining syntax that works in all browsers. You can find examples of custom classes using the newer class syntax in the extensionsJSM and extensionsTS subdirectories as well as in https://gojs.net/latest/intro/extensions.html#OverridingMethodsBySubclassingLayout

Previous