yaodingyd / react-flickity-component

A React.js component for using @desandro's Flickity
314 stars 51 forks source link

fix #34 and #35 #37

Closed yaodingyd closed 6 years ago

yaodingyd commented 6 years ago

These two issues are because when Flickity is initialized, slider items have not been added to DOM yet, and these two properties actually depend on checking DOM. L27 is because of https://github.com/metafizzy/flickity/blob/master/js/flickity.js#L198 L28-31 is because of https://github.com/metafizzy/flickity/blob/master/js/drag.js#L86-L89

Also we need to re-activate Flickity and activate will do cell 'size and 'locate' so I remove the previous two functions.

theolampert commented 6 years ago

@yaodingyd @csantos1113 merged and new npm version released.