IjzerenHein / famous-flex

Animatable layouts, FlexScrollView & widgets for famo.us.
MIT License
279 stars 44 forks source link

CollectionLayout last row just partial visible #119

Closed ghost closed 8 years ago

ghost commented 8 years ago

My code looks like this:

function _createCollectionView() {
        this.scrollView = new FlexScrollView({
                layout: CollectionLayout,
                flow: true,
                flowOptions: {
                    spring: {
                        dampingRatio: 0.8,
                        period: 1000
                    }
                },
                debug: false,
                mouseMove: true,
                useContainer: true,
                layoutOptions: {
                    itemSize: [250, 150], 
                    margins: [10, 5, 10, 5], 
                    spacing: [10, 10] 
                },
                dataSource: _getDogSurfaces.call(this)
            });
        return this.scrollView;
    }

Everything works fine, except the renderables in the last row are just partial visible when scrolling down.

I have tried to call this.scrollView.ensureVisible(lastIndex) after all renderables are actually rendered but to no avail.

What could be the possible cause of this behavior?

ghost commented 8 years ago

Please ignore, the issue was caused by the sizing and transform.translate of the parent node.