src/basis/data.js
function(value){
      var oldValue = this.value;
      var newValue = this.proxy ? this.proxy(value) : value;
      var changed = newValue !== oldValue;

      if (changed)
      {
        if (this.setNullOnEmitterDestroy)
        {
          if (oldValue instanceof Emitter)
            oldValue.removeHandler(VALUE_EMMITER_DESTROY_HANDLER, this);
          if (newValue instanceof Emitter)
            newValue.addHandler(VALUE_EMMITER_DESTROY_HANDLER, this);
        }

        this.value = newValue;

        if (!this.locked)
          this.emit_change(oldValue);
      }

      return changed;
    }
function(value){
      var oldValue = this.value;
      var newValue = this.proxy ? this.proxy(value) : value;
      var changed = newValue !== oldValue;

      if (changed)
      {
        if (this.setNullOnEmitterDestroy)
        {
          if (oldValue instanceof Emitter)
            oldValue.removeHandler(VALUE_EMMITER_DESTROY_HANDLER, this);
          if (newValue instanceof Emitter)
            newValue.addHandler(VALUE_EMMITER_DESTROY_HANDLER, this);
        }

        this.value = newValue;

        if (!this.locked)
          this.emit_change(oldValue);
      }

      return changed;
    }
function ( value ) { var oldValue = this . value ; var newValue = this . proxy ? this . proxy ( value ) : value ; var changed = newValue !== oldValue ; if ( changed ) { if ( this . setNullOnEmitterDestroy ) { if ( oldValue instanceof Emitter ) oldValue . removeHandler ( VALUE_EMMITER_DESTROY_HANDLER , this ) ; if ( newValue instanceof Emitter ) newValue . addHandler ( VALUE_EMMITER_DESTROY_HANDLER , this ) ; } this . value = newValue ; if ( ! this . locked ) this . emit_change ( oldValue ) ; } return changed ; }
Sets new value but only if value is not equivalent to current
property's value. Change event emit if value was changed.
@param {*} value New value for property.
@return {boolean} Returns true if value was changed.
Sets new value but only if value is not equivalent to current property s value . Change event emit if value was changed .