antvis / L7Draw

L7 绘制控件

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

希望移动端支持移动绘制区域

wangz-code opened this issue · comments

🐛 Bug description [Please make everyone to understand it]

Please provide a link by forking these links L7 Draw or GitHub repo, a minimal reproduction.

  • Required Link to minimal reproduction:

📷 Step to reproduce

🏞 Expected result

🚑 Any additional [like screenshots]

主要是给一些 win平板带触摸屏使用, 这种平板没有鼠标

  • L7Draw Version:
  • Platform:

Macos 12.5 Monterey
MacBook Air (M1, 2020)

"dependencies": {
"@antv/l7": "latest",
"@antv/l7-draw": "latest",
"@antv/l7-maps": "latest"
},

移动端 无法移动绘制区域

codesandbox
测试链接 : https://codesandbox.io/s/elegant-germain-z2dvrm?file=/package.json:3-113

enableDrag() {
		this.disableDrag();
		this.layers[0].on(LayerEvent.Mousedown, this.onMouseDown);
                 // 移动端没有 mousedown事件 使用 click代替
		this.layers[0].on(LayerEvent.Click, this.onMouseDown);

		this.scene.on(SceneEvent.Dragging, this.onDragging);
		this.scene.on(SceneEvent.Mouseup, this.onDragEnd);
		this.scene.on(SceneEvent.Dragend, this.onDragEnd);
	}