what's wrong with this? thx
kvker opened this issue · comments
<div className="ShowImageViewContainer"
onTouchStart={this.moveevent.bind(this)}
onMouseUp={this.moveevent.bind(this)}>
<div ref="showimageview" className="ShowImageView">
<img ref="showimage" src={_imgUrl} useMap="#planetmap" alt="" onError={this.loadError.bind(this)}
onDragStart={this.cancledefault.bind(this)}
onTouchMove={this.moveevent.bind(this)}
onTouchEnd={this.moveevent.bind(this)}
onMouseDown={this.moveevent.bind(this)}
onMouseMove={this.moveevent.bind(this)}
onLoad={this.handleImageLoaded.bind(this)}/>
<map name="planetmap" id="planetmap">
{_areas}
</map>
<div ref="showimageviewloadingimg" className="ShowImageViewloadingImg"></div>
</div>
<div className="EnlargeContainer" onClick={() => {this.sivm.enlarge(); this.refs.controlbubbleenlarge.style.display = "none"}}
onMouseOver={() => this.refs.controlbubbleenlarge.style.display = "block"}
onMouseLeave={() => this.refs.controlbubbleenlarge.style.display = "none"}>
<div ref="controlbubbleenlarge" className="ControlBubble"><p>放大</p></div>
</div>
<div className="DrawdownContainer" onClick={() => {this.sivm.drawdown(); this.refs.controlbubbledrawdown.style.display = "none"}}
onMouseOver={() => this.refs.controlbubbledrawdown.style.display = "block"}
onMouseLeave={() => this.refs.controlbubbledrawdown.style.display = "none"}>
<div ref="controlbubbledrawdown" className="ControlBubble"><p>缩小</p></div>
</div>
<div className="ResetContainer" onClick={() => {this.sivm.reset(); this.refs.controlbubblereset.style.display = "none"}}
onMouseOver={() => this.refs.controlbubblereset.style.display = "block"}
onMouseLeave={() => this.refs.controlbubblereset.style.display = "none"}>
<div ref="controlbubblereset" className="ControlBubble"><p>重置</p></div>
</div>
<div className="TransformContainer"
onTouchStart={this.imgMouseEvent.bind(this)}
onTouchEnd={this.imgMouseEvent.bind(this)}
onMouseDown={this.imgMouseEvent.bind(this)}
onMouseUp={this.imgMouseEvent.bind(this)}
onMouseOver={() => this.refs.controlbubbletransform.style.display = "block"}
onClick={() => this.refs.controlbubbletransform.style.display = "none"}
onMouseLeave={() => this.refs.controlbubbletransform.style.display = "none"}>
<div ref="controlbubbletransform" className="ControlBubble"><p>{_transformTitle}</p></div>
<img ref="transformimg" className="ShowImageViewControl" src={_transformImg} />
</div>
</div>
jsfmt,then
<div className="ShowImageViewContainer"
onTouchStart={this.moveevent.bind(this)}
onMouseUp={this.moveevent.bind(this)}>
<div ref="showimageview" className="ShowImageView">
<img ref="showimage" src={_imgUrl} useMap="#planetmap" alt="" onError={this.loadError.bind(this)}
onDragStart={this.cancledefault.bind(this)}
onTouchMove={this.moveevent.bind(this)}
onTouchEnd={this.moveevent.bind(this)}
onMouseDown={this.moveevent.bind(this)}
onMouseMove={this.moveevent.bind(this)}
onLoad={this.handleImageLoaded.bind(this)}/>
<map name="planetmap" id="planetmap">
{_areas}
</map>
<div ref="showimageviewloadingimg" className="ShowImageViewloadingImg"></div>
</div>
<div className="EnlargeContainer" onClick={() => {
this.sivm.enlarge();
this.refs.controlbubbleenlarge.style.display = "none"
}}
onMouseOver={() => this.refs.controlbubbleenlarge.style.display = "block"}
onMouseLeave={() => this.refs.controlbubbleenlarge.style.display = "none"}>
<div ref="controlbubbleenlarge" className="ControlBubble"><p>放大</p></div>
</div>
<div className="DrawdownContainer" onClick={() => {
this.sivm.drawdown();
this.refs.controlbubbledrawdown.style.display = "none"
}}
onMouseOver={() => this.refs.controlbubbledrawdown.style.display = "block"}
onMouseLeave={() => this.refs.controlbubbledrawdown.style.display = "none"}>
<div ref="controlbubbledrawdown" className="ControlBubble"><p>缩小</p></div>
</div>
<div className="ResetContainer" onClick={() => {
this.sivm.reset();
this.refs.controlbubblereset.style.display = "none"
}}
onMouseOver={() => this.refs.controlbubblereset.style.display = "block"}
onMouseLeave={() => this.refs.controlbubblereset.style.display = "none"}>
<div ref="controlbubblereset" className="ControlBubble"><p>重置</p></div>
</div>
<div className="TransformContainer"
onTouchStart={this.imgMouseEvent.bind(this)}
onTouchEnd={this.imgMouseEvent.bind(this)}
onMouseDown={this.imgMouseEvent.bind(this)}
onMouseUp={this.imgMouseEvent.bind(this)}
onMouseOver={() => this.refs.controlbubbletransform.style.display = "block"}
onClick={() => this.refs.controlbubbletransform.style.display = "none"}
onMouseLeave={() => this.refs.controlbubbletransform.style.display = "none"}>
<div ref="controlbubbletransform" className="ControlBubble"><p>{_transformTitle}</p></div>
<img ref="transformimg" className="ShowImageViewControl" src={_transformImg} />
</div>
</div>
I see that you are using jsx.
Can you please make sure that you followed the steps from here https://github.com/royriojas/esformatter-jsx/wiki/Usage-with-jsfmt ?