ItemArray problem in panel

Hi,

I’m newbie in Gojs. I got a problem with itemarray parsing.
I try to put a panel with multi shapes in a diagram. But I don’t know how to deserialize
{“class”:“go.Point”, “x”:100, “y”:50} to go.Point. I’m thinking maybe I do it in a wrong way.
Any help will be appreciated.

You can check codepen from https://codepen.io/jmlohhpv/pen/pxPZOM

That looks like it was generated by Model.toJson. Model.fromJson automatically converts those to Point objects. But if you want to do it yourself:

var obj = { "class": "go.Point", "x": 100, "y": 50 };
var pt = new go.Point(obj.x, obj.y);

It’s working. Walter, THX!