nicinabox / superslides

A fullscreen, hardware accelerated slider for jQuery.
http://archive.nicinabox.com/superslides
MIT License
1.51k stars 442 forks source link

Multiplier triples width on each resize event #288

Open lgrahl opened 9 years ago

lgrahl commented 9 years ago

I'm using the options inherit_width_from and inherit_height_from for my slides. Whenever the window size is changed, superslides updates the css attributes size and left of the slides. So far, so good.

However, after that the function superslides.css.containers is being called and updates the width of superslides.$control by superslides.width multiplied by multiplier (in my case 3). The problem is, this increases the size of the slides as well. So, for each resize event that._findWidth will return the increased size which will then be multiplied by 3 again. Obviously, this is not intended behaviour.

I'd fix the problem and submit a pull request, but before that I need to know what the purpose of the multiplier variable is.

ReeceKenney commented 6 years ago

Make sure you have; <!DOCTYPE html>

After the opening <html> block :)