Merge branch 'feature' of https://github.com/wanglin2/mind-map into feature
This commit is contained in:
commit
5ae998f304
2
dist/js/app.js
vendored
2
dist/js/app.js
vendored
File diff suppressed because one or more lines are too long
69
dist/js/chunk-7ced27a5.js
vendored
Normal file
69
dist/js/chunk-7ced27a5.js
vendored
Normal file
File diff suppressed because one or more lines are too long
69
dist/js/chunk-9e0371c2.js
vendored
69
dist/js/chunk-9e0371c2.js
vendored
File diff suppressed because one or more lines are too long
14
dist/js/chunk-vendors.js
vendored
14
dist/js/chunk-vendors.js
vendored
File diff suppressed because one or more lines are too long
@ -9,7 +9,7 @@
|
|||||||
})
|
})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
}</script><link href="dist/css/chunk-vendors.css?1c8f9269e64b9476f0c7" rel="stylesheet"><link href="dist/css/app.css?1c8f9269e64b9476f0c7" rel="stylesheet"></head><body><noscript><strong>We're sorry but thoughts doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script>const getDataFromBackend = () => {
|
}</script><link href="dist/css/chunk-vendors.css?084e0b6da4230db86524" rel="stylesheet"><link href="dist/css/app.css?084e0b6da4230db86524" rel="stylesheet"></head><body><noscript><strong>We're sorry but thoughts doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script>const getDataFromBackend = () => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
resolve({
|
resolve({
|
||||||
@ -74,4 +74,4 @@
|
|||||||
// 可以通过window.$bus.$on()来监听应用的一些事件
|
// 可以通过window.$bus.$on()来监听应用的一些事件
|
||||||
// 实例化页面
|
// 实例化页面
|
||||||
window.initApp()
|
window.initApp()
|
||||||
}</script><script src="dist/js/chunk-vendors.js?1c8f9269e64b9476f0c7"></script><script src="dist/js/app.js?1c8f9269e64b9476f0c7"></script></body></html>
|
}</script><script src="dist/js/chunk-vendors.js?084e0b6da4230db86524"></script><script src="dist/js/app.js?084e0b6da4230db86524"></script></body></html>
|
||||||
@ -111,24 +111,32 @@ class View {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 2.鼠标滚轮事件控制画布移动
|
// 2.鼠标滚轮事件控制画布移动
|
||||||
const step = isTouchPad ? 10 : mousewheelMoveStep
|
let stepX = 0
|
||||||
|
let stepY = 0
|
||||||
|
if (isTouchPad) {
|
||||||
|
// 如果是触控板,那么直接使用触控板滑动距离
|
||||||
|
stepX = Math.abs(e.wheelDeltaX)
|
||||||
|
stepY = Math.abs(e.wheelDeltaY)
|
||||||
|
} else {
|
||||||
|
stepX = stepY = mousewheelMoveStep
|
||||||
|
}
|
||||||
let mx = 0
|
let mx = 0
|
||||||
let my = 0
|
let my = 0
|
||||||
// 上移
|
// 上移
|
||||||
if (dirs.includes(CONSTANTS.DIR.DOWN)) {
|
if (dirs.includes(CONSTANTS.DIR.DOWN)) {
|
||||||
my = -step
|
my = -stepY
|
||||||
}
|
}
|
||||||
// 下移
|
// 下移
|
||||||
if (dirs.includes(CONSTANTS.DIR.UP)) {
|
if (dirs.includes(CONSTANTS.DIR.UP)) {
|
||||||
my = step
|
my = stepY
|
||||||
}
|
}
|
||||||
// 右移
|
// 右移
|
||||||
if (dirs.includes(CONSTANTS.DIR.LEFT)) {
|
if (dirs.includes(CONSTANTS.DIR.LEFT)) {
|
||||||
mx = step
|
mx = stepX
|
||||||
}
|
}
|
||||||
// 左移
|
// 左移
|
||||||
if (dirs.includes(CONSTANTS.DIR.RIGHT)) {
|
if (dirs.includes(CONSTANTS.DIR.RIGHT)) {
|
||||||
mx = -step
|
mx = -stepX
|
||||||
}
|
}
|
||||||
this.translateXY(mx, my)
|
this.translateXY(mx, my)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user