Created
November 28, 2017 16:00
-
-
Save koyta/2daa3abfa6b95cb46aa242ce7ab22c36 to your computer and use it in GitHub Desktop.
dummy component
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
const path = "http://194.87.239.90/fabric/images/3D/mannequin/1600x1600/"; | |
const Dummy = props => { | |
const imgs = []; | |
for (let i = 1; i < props.imageCount + 1; i++) { | |
imgs.push( | |
<img | |
key={i} | |
src={`${path}${i}.png`} | |
className={`preview__dummy-img ${ | |
props.img === i ? "dummy__img-active" : "" | |
}`} | |
alt="dummy" | |
/> | |
); | |
} | |
return ( | |
<div | |
className="dummy" | |
onMouseLeave={props.onMouseLeave} | |
onMouseMove={props.onMouseMove} | |
onMouseUp={props.onMouseUp} | |
onMouseDown={props.onMouseDown} | |
onWheelCapture={props.onWheelCapture} | |
style={{ | |
position: 'relaive', | |
transformOrigin: `50% ${props.imageYOffset}px`, | |
transform: `scale(${props.scaleCoefficient}) ` | |
}} | |
> | |
{imgs} | |
<div className="wearing"> | |
</div> | |
</div> | |
); | |
}; | |
export default Dummy; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment