Feat:不阻止mousedown、mousemove事件的默认行为

This commit is contained in:
街角小林 2024-08-12 10:58:17 +08:00
parent 1cd4705ad8
commit 182cdf5153
3 changed files with 2 additions and 3 deletions

View File

@ -99,7 +99,6 @@ class Event extends EventEmitter {
// 鼠标按下事件 // 鼠标按下事件
onMousedown(e) { onMousedown(e) {
e.preventDefault()
// 鼠标左键 // 鼠标左键
if (e.which === 1) { if (e.which === 1) {
this.isLeftMousedown = true this.isLeftMousedown = true
@ -115,7 +114,6 @@ class Event extends EventEmitter {
// 鼠标移动事件 // 鼠标移动事件
onMousemove(e) { onMousemove(e) {
e.preventDefault()
let { useLeftKeySelectionRightKeyDrag } = this.mindMap.opt let { useLeftKeySelectionRightKeyDrag } = this.mindMap.opt
this.mousemovePos.x = e.clientX this.mousemovePos.x = e.clientX
this.mousemovePos.y = e.clientY this.mousemovePos.y = e.clientY

View File

@ -80,6 +80,7 @@ export default {
...mapMutations(['setActiveSidebar']), ...mapMutations(['setActiveSidebar']),
init() { init() {
if (!window.katex) return
this.list = formulaList.map(item => { this.list = formulaList.map(item => {
return { return {
overview: window.katex.renderToString( overview: window.katex.renderToString(

View File

@ -169,7 +169,7 @@ export default {
if (!this.withTransition) { if (!this.withTransition) {
this.withTransition = true this.withTransition = true
} }
this.mindMap.miniMap.onMouseup(e) if (this.mindMap.miniMap) this.mindMap.miniMap.onMouseup(e)
}, },
// //