mirror of
https://github.com/ascribe/onion.git
synced 2025-01-03 18:35:09 +01:00
Merged in AD-875-slidecontainer-add-vendor-prefixe (pull request #41)
add vendor prefixes for slide container
This commit is contained in:
commit
c33976ad37
@ -241,6 +241,16 @@ let SlidesContainer = React.createClass({
|
||||
},
|
||||
|
||||
render() {
|
||||
let spacing = this.state.containerWidth * this.state.slideNum;
|
||||
let translateXValue = 'translateX(' + (-1) * spacing + 'px)';
|
||||
|
||||
/*
|
||||
According to the react documentation,
|
||||
all browser vendor prefixes need to be upper cases in the beginning except for
|
||||
the Microsoft one *bigfuckingsurprise*
|
||||
https://facebook.github.io/react/tips/inline-styles.html
|
||||
*/
|
||||
|
||||
return (
|
||||
<div
|
||||
className="container ascribe-sliding-container-wrapper"
|
||||
@ -250,7 +260,11 @@ let SlidesContainer = React.createClass({
|
||||
className="container ascribe-sliding-container"
|
||||
style={{
|
||||
width: this.state.containerWidth * this.customChildrenCount(),
|
||||
transform: 'translateX(' + (-1) * this.state.containerWidth * this.state.slideNum + 'px)'
|
||||
transform: translateXValue,
|
||||
WebkitTransform: translateXValue,
|
||||
MozTransform: translateXValue,
|
||||
OTransform: translateXValue,
|
||||
mstransform: translateXValue
|
||||
}}>
|
||||
<div className="row">
|
||||
{this.renderChildren()}
|
||||
|
Loading…
Reference in New Issue
Block a user