ZIMON.stringify does not seem to grab the latest characteristics of an object (in this case a Rectangle). How to get an update on a ZIM object metadata?

Based on the following script, it shows that zimon does not contain an update of the rect new width and height. Does it mean it is more appopriate to maintain any args and characteristics through keys and just ignore the basic arguments?

ZIMONON = true
let rect= new Rectangle(500,300,red).addTo().pos(10,10)
let zimon = ZIMON.stringify(rect);
// note: rect.width is 500, rect.height is 300;
zog(zimon);

rect.width = 100;
rect.height = 100;
zimon = ZIMON.stringify(rect);
// note: rect width and height have not been updated!
zog(zimon);

Yes... through keys for properties. Parameters are recorded at creation. Properties (even if they match the parameters are different things) are recorded with keys.

zimon = ZIMON.stringify(rect, {Rectangle:{props:["x", "y"]}}); 
1 Like