All files / src/components/entities/base entityBase.js

100% Statements 27/27
100% Branches 10/10
100% Functions 7/7
100% Lines 27/27

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46  1x 1x 1x     13x     9x 1x 8x 8x     40x     11x 2x 9x 7x   9x 9x 9x     78x     16x 1x 15x 15x     144x 144x 144x 144x 144x     1x  
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.EntityBase = void 0;
const entityParent_1 = require("./entityParent");
class EntityBase extends entityParent_1.EntityParent {
    get isActive() {
        return this._isActive;
    }
    set isActive(value) {
        if (this._isActive === value)
            return;
        this._isActive = value;
        this.isActiveChanged(value);
    }
    get isVisible() {
        return this._isVisible;
    }
    set isVisible(value) {
        if (this._isVisible === value)
            return;
        if (this._isVisible) {
            this._isEnabledVisible = this._isEnabled;
        }
        this._isVisible = value;
        this.isEnabled = value ? this._isEnabledVisible : value;
        this.isVisibleChanged(value);
    }
    get isEnabled() {
        return this._isEnabled;
    }
    set isEnabled(value) {
        if (this._isEnabled === value)
            return;
        this._isEnabled = value;
        this.isEnabledChanged(value);
    }
    constructor() {
        super();
        this._isActive = true;
        this._isVisible = true;
        this._isEnabled = true;
        this._isEnabledVisible = true;
    }
}
exports.EntityBase = EntityBase;