Skip to content

Commit

Permalink
Fix for browser prefixing transform on old but supported browsers (#464)
Browse files Browse the repository at this point in the history
  • Loading branch information
kylerc authored Nov 21, 2021
1 parent 33b2eb2 commit 50604e2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/translate.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ export default function (Glide, Components, Events) {
*/
set (value) {
let transform = mutator(Glide, Components).mutate(value)
const translate3d = `translate3d(${-1 * transform}px, 0px, 0px)`

Components.Html.wrapper.style.transform = `translate3d(${-1 * transform}px, 0px, 0px)`
Components.Html.wrapper.style.mozTransform = translate3d // needed for supported Firefox 10-15
Components.Html.wrapper.style.webkitTransform = translate3d // needed for supported Chrome 10-35, Safari 5.1-8, and Opera 15-22
Components.Html.wrapper.style.transform = translate3d
},

/**
Expand Down

0 comments on commit 50604e2

Please sign in to comment.