BowdoinOrient / bonus

Bowdoin Orient Network Update System v2, the bowdoinorient.com frontend and backend since August 2012.
http://bowdoinorient.com/
Other
3 stars 2 forks source link

swipeview progressively more offset #76

Open bjacobel opened 11 years ago

bjacobel commented 11 years ago

The longer you leave the homepage open, the more the swipeview container active tile gets incorrectly offset.

screen shot 2013-05-17 at 6 19 10 pm

bjacobel commented 11 years ago

Okay, documenting some more on this so I don't forget what I was doing when I come back to this later: this is due to the swipeview-wrapper div being set to a percentage of the page width, which on some screens ends up with a fraction of a pixel. Swipeview can't deal with those pixel fraction and either rounds or floors them, I haven't quite figured out which yet. Over time, the error builds up.

There's a way to get the width of a div with sub-pixel accuracy, and I've tried to reimplement a method in Swipeview using that instead of allowing rounding/flooring. It stretches the swipeview page infinitesimally to get rid of the 0.25-0.75 pixel error, and that fixes the bug 100% in Firefox and Safari. In Chrome, though, it causes bizzarre stretching and blurring of the fonts on the swipeview page. It's pretty fucking obnoxious.

Safari: screen shot 2013-05-24 at 11 16 40 am

Chrome: screen shot 2013-05-24 at 11 16 13 am

tophtucker commented 11 years ago

Yeah I noticed this and never really investigated. I think it's worst in Firefox; in Webkit it seems to build up far slower. Is there a way to just periodically do some kind of hard reset? Alternately, we could just have the timer loop through once and then stop back on the first item.