mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-06 03:57:56 +08:00
fix(stage): 页面高度比画布小时,滚动画布出现异常
This commit is contained in:
parent
74b865f0f9
commit
94debf51c0
@ -291,6 +291,10 @@ export default class StageMask extends Rule {
|
||||
if (!this.page) throw new Error('page 未初始化');
|
||||
|
||||
const { deltaY, deltaX } = event;
|
||||
|
||||
if (this.page.clientHeight < this.wrapperHeight && deltaY) return;
|
||||
if (this.page.clientWidth < this.wrapperWidth && deltaX) return;
|
||||
|
||||
if (this.maxScrollTop > 0) {
|
||||
this.scrollTop = this.scrollTop + deltaY;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user