mirror of
https://gitee.com/antv/g6.git
synced 2024-12-04 20:59:15 +08:00
fix: fix combo&node drag error
This commit is contained in:
parent
ed3b8d4be4
commit
3c4a262b49
@ -27,9 +27,9 @@ export default {
|
||||
},
|
||||
getEvents(): { [key in G6Event]?: string } {
|
||||
return {
|
||||
'node:panstart': 'onDragStart',
|
||||
'node:panmove': 'onDrag',
|
||||
'node:panend': 'onDragEnd',
|
||||
'node:dragstart': 'onDragStart',
|
||||
'node:drag': 'onDrag',
|
||||
'node:dragend': 'onDragEnd',
|
||||
'combo:dragenter': 'onDragEnter',
|
||||
'combo:dragleave': 'onDragLeave',
|
||||
'combo:drop': 'onDropCombo',
|
||||
|
@ -75,22 +75,6 @@ export default class EventController extends AbstractEvent {
|
||||
|
||||
evt.currentTarget = graph;
|
||||
|
||||
//if (evt.type === 'touchstart') {
|
||||
// //graph.emit('node:dragenter', evt);
|
||||
// graph.emit('node:dragstart', evt);
|
||||
//}
|
||||
|
||||
//if (evt.type === 'touchend') {
|
||||
// //graph.emit('node:drop', evt);
|
||||
// //graph.emit('canvas:drop', evt);
|
||||
// graph.emit('node:dragend', evt);
|
||||
// //graph.emit('node:dragleave', evt);
|
||||
//}
|
||||
|
||||
//if (evt.type === 'touchmove') {
|
||||
// graph.emit('node:drag', evt);
|
||||
//}
|
||||
|
||||
if (target === canvas) {
|
||||
if (eventType === 'panmove') {
|
||||
this.handleTouchMove(evt, 'canvas');
|
||||
|
@ -24,7 +24,7 @@ for (let i = 0; i < 10; i++) {
|
||||
});
|
||||
}
|
||||
|
||||
export interface BasicProps { }
|
||||
export interface BasicProps {}
|
||||
|
||||
export const BasicDemo = () => {
|
||||
const ref = React.useRef(null);
|
||||
|
Loading…
Reference in New Issue
Block a user