diff --git a/src/app/components/ngparam-input/ngparam-input.component.ts b/src/app/components/ngparam-input/ngparam-input.component.ts index 23cd83d34a3f247a019b70d1829d8ca084c4eefd..803076aeb35e6435984d15ffcd01bc5e3cb8c762 100644 --- a/src/app/components/ngparam-input/ngparam-input.component.ts +++ b/src/app/components/ngparam-input/ngparam-input.component.ts @@ -14,7 +14,7 @@ import { Observer, IObservable } from "../../services/observer"; selector: "ngparam-input", templateUrl: "../generic-input/generic-input.component.html" }) -export class NgParamInputComponent extends GenericInputComponent implements Observer { +export class NgParamInputComponent extends GenericInputComponent { // implements Observer { /** * paramètre géré */ @@ -35,10 +35,10 @@ export class NgParamInputComponent extends GenericInputComponent implements Obse /** * appelé avant le changement de modèle */ - protected beforeSetModel() { - if (this._paramDef != undefined) - this._paramDef.removeObserver(this); - } + // protected beforeSetModel() { + // if (this._paramDef != undefined) + // this._paramDef.removeObserver(this); + // } /** * appelé après le changement de modèle @@ -47,7 +47,7 @@ export class NgParamInputComponent extends GenericInputComponent implements Obse if (this._paramDef != undefined) { if (this._paramDef.isDefined) this._tmp = this._paramDef.getValue(); - this._paramDef.addObserver(this); + // this._paramDef.addObserver(this); } } @@ -107,10 +107,10 @@ export class NgParamInputComponent extends GenericInputComponent implements Obse return +ui; } - public update(sender: IObservable, data: any): void { - if (data["action"] == "value") { - this._tmp = data["value"]; - this.updateAndValidateUI(); - } - } + // public update(sender: IObservable, data: any): void { + // if (data["action"] == "value") { + // this._tmp = data["value"]; + // this.updateAndValidateUI(); + // } + // } } diff --git a/src/app/formulaire/ngparam.ts b/src/app/formulaire/ngparam.ts index c568c56b5cf933ac2b7dc182a23003393e927714..f054d4ffaf5be42a91cca552978bc5b0c1401da4 100644 --- a/src/app/formulaire/ngparam.ts +++ b/src/app/formulaire/ngparam.ts @@ -44,7 +44,7 @@ export enum ParamValueMode { /** * classe englobante de ParamDefinition (champs supplémentaires pour l'affichage, radio boutons, ...) */ -export class NgParameter extends InputField implements IObservable { +export class NgParameter extends InputField { // implements IObservable { public unit: string; public radioConfig: ParamRadioConfig; public radioState: ParamRadioConfig; @@ -99,12 +99,12 @@ export class NgParameter extends InputField implements IObservable { public setValue(val: number) { this._paramDef.v = val; - this.notifyObservers( - { - "action": "value", - "value": val - } - ) + // this.notifyObservers( + // { + // "action": "value", + // "value": val + // } + // ) } get isDefined(): boolean { @@ -327,26 +327,26 @@ export class NgParameter extends InputField implements IObservable { return new NgParameter(this._paramDef.clone()); } - // interface IObservable - - /** - * ajoute un observateur à la liste - */ - public addObserver(o: Observer) { - this._observable.addObserver(o); - } - - /** - * supprime un observateur de la liste - */ - public removeObserver(o: Observer) { - this._observable.removeObserver(o); - } - - /** - * notifie un événement aux observateurs - */ - public notifyObservers(data: any) { - this._observable.notifyObservers(data, this); - } + // // interface IObservable + + // /** + // * ajoute un observateur à la liste + // */ + // public addObserver(o: Observer) { + // this._observable.addObserver(o); + // } + + // /** + // * supprime un observateur de la liste + // */ + // public removeObserver(o: Observer) { + // this._observable.removeObserver(o); + // } + + // /** + // * notifie un événement aux observateurs + // */ + // public notifyObservers(data: any) { + // this._observable.notifyObservers(data, this); + // } }