Change layer property in SwitchLayerAction from private to public.
This commit is contained in:
@@ -13,18 +13,18 @@ export class SwitchLayerAction extends KeyAction {
|
|||||||
isLayerToggleable: boolean;
|
isLayerToggleable: boolean;
|
||||||
|
|
||||||
@assertEnum(LayerName)
|
@assertEnum(LayerName)
|
||||||
private _layer: LayerName;
|
layer: LayerName;
|
||||||
|
|
||||||
_fromJsObject(jsObject: any): SwitchLayerAction {
|
_fromJsObject(jsObject: any): SwitchLayerAction {
|
||||||
this.assertKeyActionType(jsObject);
|
this.assertKeyActionType(jsObject);
|
||||||
this._layer = LayerName[<string> jsObject.layer];
|
this.layer = LayerName[<string> jsObject.layer];
|
||||||
this.isLayerToggleable = jsObject.toggle;
|
this.isLayerToggleable = jsObject.toggle;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
_fromBinary(buffer: UhkBuffer): SwitchLayerAction {
|
_fromBinary(buffer: UhkBuffer): SwitchLayerAction {
|
||||||
this.readAndAssertKeyActionId(buffer);
|
this.readAndAssertKeyActionId(buffer);
|
||||||
this._layer = buffer.readUInt8();
|
this.layer = buffer.readUInt8();
|
||||||
this.isLayerToggleable = buffer.readBoolean();
|
this.isLayerToggleable = buffer.readBoolean();
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -47,7 +47,4 @@ export class SwitchLayerAction extends KeyAction {
|
|||||||
return `<SwitchLayerAction layer="${this.layer}" toggle="${this.isLayerToggleable}">`;
|
return `<SwitchLayerAction layer="${this.layer}" toggle="${this.isLayerToggleable}">`;
|
||||||
}
|
}
|
||||||
|
|
||||||
get layer() {
|
|
||||||
return this._layer;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user