importShapefrom'./Shape.js'import{nodeOrNew}from'./tools.js'exportdefaultclassRectextendsShape{// Initialize nodeconstructor(node){super(nodeOrNew('rect',node))}}addFactory(Parent,{// Create a rect elementrect(width,height){returnthis.put(newRect()).size(width,height)}})