admin/desktop/browser.js
/**
     * Create a new computed value based on a function expression.
     *
     * The `name` property is for debug purposes only.
     *
     * The `equals` property specifies the comparer function to use to determine if a newly produced
     * value differs from the previous value. Two comparers are provided in the library; `defaultComparer`
     * compares based on identity comparison (===), and `structualComparer` deeply compares the structure.
     * Structural comparison can be convenient if you always produce an new aggregated object and
     * don't want to notify observers if it is structurally the same.
     * This is useful for working with vectors, mouse coordinates etc.
     */
Create a new computed value based on a function expression.
The `name` property is for debug purposes only.

The `equals` property specifies the comparer function to use to determine if a newly produced
value differs from the previous value. Two comparers are provided in the library; `defaultComparer`
compares based on identity comparison (===), and `structualComparer` deeply compares the structure.
Structural comparison can be convenient if you always produce an new aggregated object and
don't want to notify observers if it is structurally the same.
This is useful for working with vectors, mouse coordinates etc.
Create a new computed value based on a function expression . The ` name ` property is for debug purposes only . The ` equals ` property specifies the comparer function to use to determine if a newly produced value differs from the previous value . Two comparers are provided in the library ; ` defaultComparer ` compares based on identity comparison ( === ) and ` structualComparer ` deeply compares the structure . Structural comparison can be convenient if you always produce an new aggregated object and don ' t want to notify observers if it is structurally the same . This is useful for working with vectors mouse coordinates etc .
function ComputedValue(derivation, scope, equals, name, setter) {
        this.derivation = derivation;
        this.scope = scope;
        this.equals = equals;
        this.dependenciesState = IDerivationState.NOT_TRACKING;
        this.observing = []; 
        this.newObserving = null; 
        this.isPendingUnobservation = false;
        this.observers = [];
        this.observersIndexes = {};
        this.diffValue = 0;
        this.runId = 0;
        this.lastAccessedBy = 0;
        this.lowestObserverState = IDerivationState.UP_TO_DATE;
        this.unboundDepsCount = 0;
        this.__mapid = "#" + getNextId();
        this.value = new CaughtException(null);
        this.isComputing = false; 
        this.isRunningSetter = false;
        this.isTracing = TraceMode.NONE;
        this.name = name || "ComputedValue@" + getNextId();
        if (setter)
            this.setter = createAction(name + "-setter", setter);
    }
function ComputedValue ( derivation , scope , equals , name , setter ) { this . derivation = derivation ; this . scope = scope ; this . equals = equals ; this . dependenciesState = IDerivationState . NOT_TRACKING ; this . observing = [ ] ; this . newObserving = null ; this . isPendingUnobservation = false ; this . observers = [ ] ; this . observersIndexes = { } ; this . diffValue = 0 ; this . runId = 0 ; this . lastAccessedBy = 0 ; this . lowestObserverState = IDerivationState . UP_TO_DATE ; this . unboundDepsCount = 0 ; this . __mapid = "#" + getNextId ( ) ; this . value = new CaughtException ( null ) ; this . isComputing = false ; this . isRunningSetter = false ; this . isTracing = TraceMode . NONE ; this . name = name || "ComputedValue@" + getNextId ( ) ; if ( setter ) this . setter = createAction ( name + "-setter" , setter ) ; }
Create a new computed value based on a function expression.
Create a new computed value based on a function expression .
// nodes we are looking at. Our value depends on these nodes // during tracking it's an array with new observed observers // to check for cycles