mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
fix: 画布缩放快捷与文档说明不一致修正
This commit is contained in:
parent
9fde7522b0
commit
c87703df22
@ -158,7 +158,16 @@ export default () => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!editorAreaFocus.value && !thumbnailsFocus.value) return
|
if (!editorAreaFocus.value && !thumbnailsFocus.value) {
|
||||||
|
if (
|
||||||
|
!disableHotkeys.value &&
|
||||||
|
((ctrlOrMetaKeyActive && key === KEYS.MINUS) || (ctrlOrMetaKeyActive && key === KEYS.EQUAL))
|
||||||
|
) {
|
||||||
|
// 禁止浏览器默认缩放
|
||||||
|
e.preventDefault()
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if (ctrlOrMetaKeyActive && key === KEYS.C) {
|
if (ctrlOrMetaKeyActive && key === KEYS.C) {
|
||||||
if (disableHotkeys.value) return
|
if (disableHotkeys.value) return
|
||||||
@ -255,17 +264,17 @@ export default () => {
|
|||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
create()
|
create()
|
||||||
}
|
}
|
||||||
if (key === KEYS.MINUS) {
|
if (ctrlOrMetaKeyActive && key === KEYS.MINUS) {
|
||||||
if (disableHotkeys.value) return
|
if (disableHotkeys.value) return
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
scaleCanvas('-')
|
scaleCanvas('-')
|
||||||
}
|
}
|
||||||
if (key === KEYS.EQUAL) {
|
if (ctrlOrMetaKeyActive && key === KEYS.EQUAL) {
|
||||||
if (disableHotkeys.value) return
|
if (disableHotkeys.value) return
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
scaleCanvas('+')
|
scaleCanvas('+')
|
||||||
}
|
}
|
||||||
if (key === KEYS.DIGIT_0) {
|
if (ctrlOrMetaKeyActive && key === KEYS.DIGIT_0) {
|
||||||
if (disableHotkeys.value) return
|
if (disableHotkeys.value) return
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
resetCanvas()
|
resetCanvas()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user