Codeinwp / Ideal-Image-Slider-JS

Quite simply the ideal Image Slider in vanilla JS.
http://idealimageslider.com
GNU General Public License v3.0
1.57k stars 160 forks source link

fix for null values in the settings #37

Closed acechase closed 9 years ago

acechase commented 9 years ago

I am using my container's CSS height so I don't want the settings.height value.

To achieve this effect you need to pass in "height: null" in the settings because otherwise the code will override the container's height when it sees a non-null value in the settings. So passing "height: null" in the settings will fix the issue. To make that work, need to fix this little issue with deepExtend.

p.s. I originally fixed the problem in a slightly different way by initializing the default settings.height to null and then, if the container's own css height was not set, and no settings.height was provided by the client, then I supplied a default value of 400px. Both methods fix the problem equally well, but PR here was the smallest possible change.