2017-06-04 10:40:14 +08:00
|
|
|
import React from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
2016-05-31 06:07:02 +08:00
|
|
|
|
|
|
|
export default class Slide extends React.Component {
|
|
|
|
constructor(props) {
|
|
|
|
super(props);
|
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<g>
|
2016-06-27 22:48:17 +08:00
|
|
|
{this.props.currentSlide ?
|
2016-07-10 05:42:33 +08:00
|
|
|
<g>
|
|
|
|
<rect
|
|
|
|
x="0"
|
|
|
|
y="0"
|
|
|
|
width={this.props.currentSlide.slide.width}
|
|
|
|
height={this.props.currentSlide.slide.height}
|
|
|
|
fill="white"
|
2017-06-03 03:25:02 +08:00
|
|
|
/>
|
|
|
|
<image
|
|
|
|
x="0" y="0"
|
2016-07-10 05:42:33 +08:00
|
|
|
width={this.props.currentSlide.slide.width}
|
|
|
|
height={this.props.currentSlide.slide.height}
|
|
|
|
xlinkHref={this.props.currentSlide.slide.img_uri}
|
|
|
|
strokeWidth="0.8"
|
2017-06-03 03:25:02 +08:00
|
|
|
/>
|
2016-07-10 05:42:33 +08:00
|
|
|
</g>
|
2016-06-03 06:09:28 +08:00
|
|
|
: null }
|
2016-05-31 06:07:02 +08:00
|
|
|
</g>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|