app/src/views/reflowableScrollview.js
/**
     * _customCommit inherits most of its logic and code from Scroller's commit method, but allows
     * us to intercept and replace the original viewSequence before .render() is called.
     * This is because Scrollview lays out its renderables using a ViewSequence (like a linked-list), 
     * so a new ViewSequence has to be constructed each time there is a resizing event. 
     * @private
     * @param {Context} context commit context
     */
_customCommit inherits most of its logic and code from Scroller's commit method, but allows
us to intercept and replace the original viewSequence before .render() is called.
This is because Scrollview lays out its renderables using a ViewSequence (like a linked-list),
so a new ViewSequence has to be constructed each time there is a resizing event.
@private
@param {Context} context commit context
_customCommit inherits most of its logic and code from Scroller ' s commit method but allows us to intercept and replace the original viewSequence before . render () is called . This is because Scrollview lays out its renderables using a ViewSequence ( like a linked - list ) so a new ViewSequence has to be constructed each time there is a resizing event . @private @param { Context } context commit context
function _customCommit(context) {
        var _scroller = this._scroller;
        var transform = context.transform;
        var opacity = context.opacity;
        var origin = context.origin;
        var size = context.size;
        if (!_scroller.options.clipSize && (size[0] !== _scroller._contextSize[0] || size[1] !== _scroller._contextSize[1])) {
            _scroller._onEdge = 0;
            _scroller._contextSize[0] = size[0];
            _scroller._contextSize[1] = size[1];
            this._previousTranslationObject = this._currentTranslationObject;
            if (!this._debounceFlag && this._timer) {
                var _timeDebouncedCreateNewViewSequence = Timer.debounce(_createNewViewSequence, this.options.debounceTimer);
                _timeDebouncedCreateNewViewSequence.call(this, context);
                this._timer = false;
            }
            if (this._debounceFlag) {
                _initTransitionables.call(this); 
                _createNewViewSequence.call(this, context);
                this._debounceFlag = false;
            }
            if (_scroller.options.direction === Utility.Direction.X) {
                _scroller._size[0] = _getClipSize.call(_scroller);
                _scroller._size[1] = undefined;
            }
            else {
                _scroller._size[0] = undefined;
                _scroller._size[1] = _getClipSize.call(_scroller);
            }
        }
        var scrollTransform = _scroller._masterOutputFunction(-_scroller._position);
        return {
            transform: Transform.multiply(transform, scrollTransform),
            opacity: opacity,
            origin: origin,
            target: _scroller.group.render()
        };
    }
function _customCommit ( context ) { var _scroller = this . _scroller ; var transform = context . transform ; var opacity = context . opacity ; var origin = context . origin ; var size = context . size ; if ( ! _scroller . options . clipSize && ( size [ 0 ] !== _scroller . _contextSize [ 0 ] || size [ 1 ] !== _scroller . _contextSize [ 1 ] ) ) { _scroller . _onEdge = 0 ; _scroller . _contextSize [ 0 ] = size [ 0 ] ; _scroller . _contextSize [ 1 ] = size [ 1 ] ; this . _previousTranslationObject = this . _currentTranslationObject ; if ( ! this . _debounceFlag && this . _timer ) { var _timeDebouncedCreateNewViewSequence = Timer . debounce ( _createNewViewSequence , this . options . debounceTimer ) ; _timeDebouncedCreateNewViewSequence . call ( this , context ) ; this . _timer = false ; } if ( this . _debounceFlag ) { _initTransitionables . call ( this ) ; _createNewViewSequence . call ( this , context ) ; this . _debounceFlag = false ; } if ( _scroller . options . direction === Utility . Direction . X ) { _scroller . _size [ 0 ] = _getClipSize . call ( _scroller ) ; _scroller . _size [ 1 ] = undefined ; } else { _scroller . _size [ 0 ] = undefined ; _scroller . _size [ 1 ] = _getClipSize . call ( _scroller ) ; } } var scrollTransform = _scroller . _masterOutputFunction ( - _scroller . _position ) ; return { transform : Transform . multiply ( transform , scrollTransform ) , opacity : opacity , origin : origin , target : _scroller . group . render ( ) } ; }
_customCommit inherits most of its logic and code from Scroller's commit method, but allows
 us to intercept and replace the original viewSequence before .render() is called.
_customCommit inherits most of its logic and code from Scroller ' s commit method but allows us to intercept and replace the original viewSequence before . render () is called .
// To avoid mixing context, 'this' will always be an instance of reflowableScrollview // reset edge detection on size change // begin custom code extending scroller's commit function // new view sequence gets generated upon resizing event // first time execution of this reflowable scroll view, the following gets run only once // initialize an array of TransitionableTransforms // end custom code