Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

开启鼠标滚动直接缩放视图后,鼠标中键不可平移视图 #349

Open
johnnhan opened this issue Feb 8, 2025 · 3 comments
Open

Comments

@johnnhan
Copy link

johnnhan commented Feb 8, 2025

官方文档描述的是可以的

Image

@johnnhan
Copy link
Author

johnnhan commented Feb 8, 2025

import { Leafer, Rect } from 'leafer-ui';
import '@leafer-in/viewport';

const leafer = new Leafer({
  view: window,
  type: 'viewport',
  wheel: { zoomMode: true },
});

leafer.add(Rect.one({ fill: '#32cd79' }, 100, 100, 200, 200));

@johnnhan
Copy link
Author

johnnhan commented Feb 8, 2025

move.holdMiddleKey: boolean
按住滚轮中键拖拽是否平移视图,默认为 true

我试了下,把这个设置为true可以了,但是文档说默认就是true

@leaferjs
Copy link
Owner

leaferjs commented Feb 9, 2025

感谢反馈,可以优化一下~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants