sul-dlss-deprecated / iiifManifestLayouts

Other
10 stars 5 forks source link

Reflow looks a little strange in Safari. #81

Open aeschylus opened 9 years ago

aeschylus commented 9 years ago

Changing thumbsize causes the images (only) to jump up outside of their frames before transitioning. This is probably because I've used "transform" but not "-webkit-transform" somewhere.

mejackreed commented 9 years ago

I can't seem to find where this is happening

aeschylus commented 9 years ago

Pretty sure it's here: https://github.com/sul-dlss/iiifManifestLayouts/blob/master/src/main.js#L259-L261 and https://github.com/sul-dlss/iiifManifestLayouts/blob/master/src/main.js#L259-L261

I'm not sure how to change this though. this in this instance is the element d3 is sending to the interpolator function, so this.style.transform is literally the DOM style property. Unfortunately, however, it seems the property will only exist in safari, so a check will need to be written to only attempt to interpolate that if it exists.

aeschylus commented 9 years ago

If you just change the thumbSize with the slider in safari you'll see it happening.

aeschylus commented 9 years ago

To clarify, the property will be this.style.transform in chrome, and this.style.webkitTransform in safari. The value in both cases is a string, which is why i'm having to use a string interpolator.

More on d3 interpolators.