失去交点判断
This commit is contained in:
@ -433,14 +433,20 @@ class YJEarth {
|
|||||||
if (x > left && x < left + width && y > top && y < top + height) {
|
if (x > left && x < left + width && y > top && y < top + height) {
|
||||||
if (_this.clickTextDom) {
|
if (_this.clickTextDom) {
|
||||||
_this.clickTextDom.style['pointer-events'] = 'none'
|
_this.clickTextDom.style['pointer-events'] = 'none'
|
||||||
_this.entityMap.get(_this.clickTextDom.id).getwords(_this.clickTextDom.getElementsByTagName('textarea')[0].value)
|
_this.clickTextDom.querySelector('textarea').removeEventListener('blur', _this.blurFun)
|
||||||
// _this.entityMap.get(_this.clickTextDom.id).isClick(movement.position, _this.clickTextDom.id)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_this.clickTextDom = textList[i]
|
_this.clickTextDom = textList[i]
|
||||||
textList[i].style['pointer-events'] = 'all'
|
textList[i].style['pointer-events'] = 'all'
|
||||||
textList[i].querySelector('textarea').focus()
|
textList[i].querySelector('textarea').focus()
|
||||||
_this.isLeftClick = true
|
_this.isLeftClick = true
|
||||||
_this.entityMap.get(_this.clickTextDom.id).isClick(movement.position, _this.clickTextDom.id)
|
_this.entityMap.get(_this.clickTextDom.id).isClick(movement.position, _this.clickTextDom.id)
|
||||||
|
|
||||||
|
_this.blurFun = () => {
|
||||||
|
_this.entityMap.get(_this.clickTextDom.id).isClick((movement && movement.position) || null, _this.clickTextDom.id)
|
||||||
|
_this.entityMap.get(_this.clickTextDom.id).getwords(_this.clickTextDom.getElementsByTagName('textarea')[0].value)
|
||||||
|
}
|
||||||
|
_this.clickTextDom.querySelector('textarea').addEventListener('blur', _this.blurFun)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user