diff --git a/src/pab/pab_cloisons.ts b/src/pab/pab_cloisons.ts index ab61bbfb58ed2fdf6177def7477209b60fcd8801..2e0edc24ae26f38614025679af6ca1ff41ce7e06 100644 --- a/src/pab/pab_cloisons.ts +++ b/src/pab/pab_cloisons.ts @@ -77,6 +77,25 @@ export class PabCloisons extends Cloisons { this._children = modelCloisons ? modelCloisons.structures : []; } + /** + * Returns an object representation of the Nub's current state + */ + public objectRepresentation() { + const ret: any = { + uid: this.uid, + props: this.properties.props, + parameters: [] + }; + + // ! do not iterate over local parameters (would copy the parameters of the Cloisons used as model), + // just serialise QA + ret.parameters.push(this.prms.QA.objectRepresentation()); + + // ! do not iterate over children Nubs (would copy the children of the Cloisons used as model) + + return ret; + } + /** * paramétrage de la calculabilité des paramètres */