diff --git a/src/App.css b/src/App.css index 650534a5..809fdb51 100644 --- a/src/App.css +++ b/src/App.css @@ -79,11 +79,10 @@ body.overlay-open .overlay { color: white; } -#focused-skin .focused-preview { - -webkit-transition: opacity 400ms ease-in-out; - -moz-transition: opacity 400ms ease-in-out; - -ms-transition: opacity 400ms ease-in-out; +#focused-skin { + visibility: visible; } -#focused-skin .focused-preview.loaded { +#focused-skin.loaded { opacity: 0; + visibility: hidden; } diff --git a/src/FocusedSkin.js b/src/FocusedSkin.js index 7b5d53b3..3e4fc25a 100644 --- a/src/FocusedSkin.js +++ b/src/FocusedSkin.js @@ -1,6 +1,7 @@ import React from "react"; import ReactDOM from "react-dom"; import { connect } from "react-redux"; +import classnames from "classnames"; import WebampComponent from "./WebampComponent"; import * as Utils from "./utils"; import * as Selectors from "./redux/selectors"; @@ -11,9 +12,10 @@ class FocusedSkin extends React.Component { super(props); // TODO: Handle the case were we come from a permalink if (this.props.initialPosition == null) { - this.state = this._getCenteredState(); + this.state = Object.assign({ loaded: false }, this._getCenteredState()); } else { this.state = { + loaded: false, top: this.props.initialPosition.top, left: this.props.initialPosition.left, width: this.props.initialWidth, @@ -49,9 +51,11 @@ class FocusedSkin extends React.Component { }; } render() { + const { loaded } = this.state; return ReactDOM.createPortal(