1
0
mirror of https://github.com/ascribe/onion.git synced 2024-06-30 13:41:57 +02:00

add vendor prefixes for slide container

This commit is contained in:
Tim Daubenschütz 2015-08-27 18:11:47 +02:00
parent b229dbb79f
commit 8e5c04140f

View File

@ -241,6 +241,16 @@ let SlidesContainer = React.createClass({
}, },
render() { render() {
let translateXValue = 'translateX(' + (-1) * this.state.containerWidth * this.state.slideNum + '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 ( return (
<div <div
className="container ascribe-sliding-container-wrapper" className="container ascribe-sliding-container-wrapper"
@ -250,7 +260,11 @@ let SlidesContainer = React.createClass({
className="container ascribe-sliding-container" className="container ascribe-sliding-container"
style={{ style={{
width: this.state.containerWidth * this.customChildrenCount(), 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"> <div className="row">
{this.renderChildren()} {this.renderChildren()}