-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
求助,双指缩放与画布拖拽有冲突,怎么办? #2813
Comments
Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. To help make it easier for us to investigate your issue, please follow the contributing guidelines. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. |
如果只是浏览,直接用viewport scalable |
在 2.x 版本中已经将画布设置为无法双指缩放。https://github.com/antvis/X6/blob/master/packages/x6/src/style/index.less#L9 |
请问问题解决了吗?我也遇到了类似问题 |
@TANGYICONG 将画布设置为不可缩放 .x6-graph {
touch-action: none;
} |
+1,求解 |
这个问题你解决了吗,跟你一模一样的需求 |
我解决了,自己手动实现了画布的缩放和组件的拖动 |
为什么X6不做移动端的适配呢? |
@cooljser |
@NewByVector 设为不可缩放的原因是什么?底层有什么冲突么?如果硬要加这双指缩放的功能呢? |
问题描述
issue产生的背景:x6项目是一个平台web项目,有一个app项目通过webView访问该平台web项目。平台web项目为了让app的用户用户体验更好,增加了双指缩放画布大小的功能。但实际效果是,app上使用双指缩放时与画布本身的拖拽功能产生冲突。具体可以看下我上传的视频。
重现链接
无
重现步骤
1、将x6的web项目做成响应式,并在画布容器上绑定touchstart、 touchend、 touchmove事件(利用这3个事件制作双指缩放功能),画布本身的可拖拽选项为打开状态;
2、手机端通过webView访问web项目,并使用双指缩放功能
预期行为
我期望看到,在移动端,利用双指进行缩放的时候不会与拖拽功能产生冲突
平台
屏幕截图或视频(可选)
SVID_20221028_153445_1.mp4
补充说明(可选)
No response
The text was updated successfully, but these errors were encountered: