src/model.js
function propergateEvent (isAtoB, property /*, ... other event callback arguments */) {
            var eventName = arguments[arguments.length-1]; //Since this is registered on the all event the last argument is the orginal Event name.
            if (eventName === Model.Event.CHILD_DESTROYED) { //we listen to he destroy action so no need to listen to CHILD_DESTROYED too
                return;
            }
            if(options && (options.eventBlackList || options.eventWhiteList)) {
                if (options.eventBlackList && options.eventBlackList.indexOf(eventName) !== -1) {
                    return;
                }
                if (options.eventWhiteList && options.eventWhiteList.indexOf(eventName) === -1) {
                    return;
                }
            }

            var linkedProperty = this;
            var newPropDisconnect;
            var reversePropergationFunction = isAtoB? propergateDestToSrc: propergateSrcToDest;

            // deregister our reverse propergation function and put it back later, so we don't have infinite loop.
            if (reversePropergationFunction) { // this will not exist if the connection direction was "one-way"
                linkedProperty.off(Model.Event.ALL, reversePropergationFunction);
            }

            if (eventName === Model.Event.PROPERTY_CHANGE) {
                linkedProperty.setValue(property.getValue());
            } else if (eventName === Model.Event.CHILD_CREATED) {
                var newProperty = arguments[2];
                if (Model.isArray(linkedProperty)) {
                    // newProperty.getShortName() == linkedProperty.length; <- do push when this is true
                    linkedProperty.push(newProperty.getValue());
                    newPropDisconnect = connect(newProperty, linkedProperty[newProperty.getShortName()]);
                } else {
                    linkedProperty.createProperty(newProperty.getShortName(), newProperty.getValue(), newProperty.getMetadata());
                    newPropDisconnect = connect(newProperty, linkedProperty[newProperty.getShortName()]);
                }
            } else if (eventName === Model.Event.DESTROY) {
                if (Model.isArray(linkedProperty._parent) &&
                    parseInt(linkedProperty.getShortName(), 10) === linkedProperty._parent.length - 1) {
                    linkedProperty._parent.pop();
                } else {
                    linkedProperty.destroy();
                }
            } else { //custom event
                // remove the first argument, 'isAtoB' which is bound to this function via bind
                // also remove the second which is the property event triggered on
                // extract the middle
                // remove the last argument which is the event name since this method is registared to the Model.Event.ALL event.
                var args = [eventName].concat(Array.prototype.slice.call(arguments, 2, arguments.length-1));
                Property.prototype.trigger.apply(linkedProperty, args );
            }

            // only restore the connection if property is not destroyed
            if (eventName !== Model.Event.DESTROY && reversePropergationFunction) {
                linkedProperty.on(Model.Event.ALL, reversePropergationFunction);
            }

            return newPropDisconnect; // how do we disconnect this.
        }
function propergateEvent (isAtoB, property /*, ... other event callback arguments */) {
            var eventName = arguments[arguments.length-1]; //Since this is registered on the all event the last argument is the orginal Event name.
            if (eventName === Model.Event.CHILD_DESTROYED) { //we listen to he destroy action so no need to listen to CHILD_DESTROYED too
                return;
            }
            if(options && (options.eventBlackList || options.eventWhiteList)) {
                if (options.eventBlackList && options.eventBlackList.indexOf(eventName) !== -1) {
                    return;
                }
                if (options.eventWhiteList && options.eventWhiteList.indexOf(eventName) === -1) {
                    return;
                }
            }

            var linkedProperty = this;
            var newPropDisconnect;
            var reversePropergationFunction = isAtoB? propergateDestToSrc: propergateSrcToDest;

            // deregister our reverse propergation function and put it back later, so we don't have infinite loop.
            if (reversePropergationFunction) { // this will not exist if the connection direction was "one-way"
                linkedProperty.off(Model.Event.ALL, reversePropergationFunction);
            }

            if (eventName === Model.Event.PROPERTY_CHANGE) {
                linkedProperty.setValue(property.getValue());
            } else if (eventName === Model.Event.CHILD_CREATED) {
                var newProperty = arguments[2];
                if (Model.isArray(linkedProperty)) {
                    // newProperty.getShortName() == linkedProperty.length; <- do push when this is true
                    linkedProperty.push(newProperty.getValue());
                    newPropDisconnect = connect(newProperty, linkedProperty[newProperty.getShortName()]);
                } else {
                    linkedProperty.createProperty(newProperty.getShortName(), newProperty.getValue(), newProperty.getMetadata());
                    newPropDisconnect = connect(newProperty, linkedProperty[newProperty.getShortName()]);
                }
            } else if (eventName === Model.Event.DESTROY) {
                if (Model.isArray(linkedProperty._parent) &&
                    parseInt(linkedProperty.getShortName(), 10) === linkedProperty._parent.length - 1) {
                    linkedProperty._parent.pop();
                } else {
                    linkedProperty.destroy();
                }
            } else { //custom event
                // remove the first argument, 'isAtoB' which is bound to this function via bind
                // also remove the second which is the property event triggered on
                // extract the middle
                // remove the last argument which is the event name since this method is registared to the Model.Event.ALL event.
                var args = [eventName].concat(Array.prototype.slice.call(arguments, 2, arguments.length-1));
                Property.prototype.trigger.apply(linkedProperty, args );
            }

            // only restore the connection if property is not destroyed
            if (eventName !== Model.Event.DESTROY && reversePropergationFunction) {
                linkedProperty.on(Model.Event.ALL, reversePropergationFunction);
            }

            return newPropDisconnect; // how do we disconnect this.
        }
function propergateEvent ( isAtoB , property /*, ... other event callback arguments */ ) { var eventName = arguments [ arguments . length - 1 ] ; //Since this is registered on the all event the last argument is the orginal Event name.
 if ( eventName === Model . Event . CHILD_DESTROYED ) { //we listen to he destroy action so no need to listen to CHILD_DESTROYED too
 return ; } if ( options && ( options . eventBlackList || options . eventWhiteList ) ) { if ( options . eventBlackList && options . eventBlackList . indexOf ( eventName ) !== - 1 ) { return ; } if ( options . eventWhiteList && options . eventWhiteList . indexOf ( eventName ) === - 1 ) { return ; } } var linkedProperty = this ; var newPropDisconnect ; var reversePropergationFunction = isAtoB ? propergateDestToSrc : propergateSrcToDest ; // deregister our reverse propergation function and put it back later, so we don't have infinite loop.
 if ( reversePropergationFunction ) { // this will not exist if the connection direction was "one-way"
 linkedProperty . off ( Model . Event . ALL , reversePropergationFunction ) ; } if ( eventName === Model . Event . PROPERTY_CHANGE ) { linkedProperty . setValue ( property . getValue ( ) ) ; } else if ( eventName === Model . Event . CHILD_CREATED ) { var newProperty = arguments [ 2 ] ; if ( Model . isArray ( linkedProperty ) ) { // newProperty.getShortName() == linkedProperty.length; <- do push when this is true
 linkedProperty . push ( newProperty . getValue ( ) ) ; newPropDisconnect = connect ( newProperty , linkedProperty [ newProperty . getShortName ( ) ] ) ; } else { linkedProperty . createProperty ( newProperty . getShortName ( ) , newProperty . getValue ( ) , newProperty . getMetadata ( ) ) ; newPropDisconnect = connect ( newProperty , linkedProperty [ newProperty . getShortName ( ) ] ) ; } } else if ( eventName === Model . Event . DESTROY ) { if ( Model . isArray ( linkedProperty . _parent ) && parseInt ( linkedProperty . getShortName ( ) , 10 ) === linkedProperty . _parent . length - 1 ) { linkedProperty . _parent . pop ( ) ; } else { linkedProperty . destroy ( ) ; } } else { //custom event
 // remove the first argument, 'isAtoB' which is bound to this function via bind
 // also remove the second which is the property event triggered on
 // extract the middle
 // remove the last argument which is the event name since this method is registared to the Model.Event.ALL event.
 var args = [ eventName ] . concat ( Array . prototype . slice . call ( arguments , 2 , arguments . length - 1 ) ) ; Property . prototype . trigger . apply ( linkedProperty , args ) ; } // only restore the connection if property is not destroyed
 if ( eventName !== Model . Event . DESTROY && reversePropergationFunction ) { linkedProperty . on ( Model . Event . ALL , reversePropergationFunction ) ; } return newPropDisconnect ; // how do we disconnect this.
 }
This function is registered on the ALL event to propagate its events to the
connected property. FYI 'this' is bound to the source linked property.

@param  {Boolean} isAtoB   [description]
@param  {[type]}  property On any event the first argument is the property the event was triggered on.
@return {[type]}           [description]
This function is registered on the ALL event to propagate its events to the connected property . FYI this is bound to the source linked property .