|
@@ -8,6 +8,7 @@ import pic3 from '../img/pic3.png'
|
|
|
import pic4 from '../img/pic4.png'
|
|
|
import pic5 from '../img/pic5.png'
|
|
|
import $ from 'jquery'
|
|
|
+import { dragBox } from '@utils/drag';
|
|
|
|
|
|
class EmergencyModal extends React.Component{
|
|
|
constructor(props){
|
|
@@ -41,7 +42,13 @@ class EmergencyModal extends React.Component{
|
|
|
this.props.setDataIdx(num)
|
|
|
}
|
|
|
handleImgShow(flg){
|
|
|
- this.setState({imgShow:flg})
|
|
|
+ this.setState({imgShow:flg},()=>{
|
|
|
+ if(flg){
|
|
|
+ dragBox('dragModalWrap','dragModalTitle','add')
|
|
|
+ }else{
|
|
|
+ dragBox('dragModalWrap','dragModalTitle','del')
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
render(){
|
|
|
const {data,handleShow,setDataIdx,idx,show} = this.props;
|
|
@@ -56,8 +63,10 @@ class EmergencyModal extends React.Component{
|
|
|
{
|
|
|
this.state.imgShow?<React.Fragment>
|
|
|
<div className={styles.imageModalWrap} onClick={()=>{this.handleImgShow(false)}}></div>
|
|
|
- <div className={styles.imageModal}>
|
|
|
- <img src={idx==1?pic1:idx==2?pic2:idx==3?pic3:idx==4?pic4:idx==5?pic5:null} alt=""/>
|
|
|
+ <div className={styles.imageModal} id="dragModalWrap">
|
|
|
+ <img src={idx==1?pic1:idx==2?pic2:idx==3?pic3:idx==4?pic4:idx==5?pic5:null}/>
|
|
|
+ <div id="dragModalTitle" className={`${styles.dragImgWrap} drag-title`}>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</React.Fragment>:null
|
|
|
}
|