0
下面的canDrag方法鼠標位置是我拖動源規範的canDrag方法: 獲取的DragSource所規範
const itemDragSource = {
canDrag(props, monitor) {
if(props.canDrag && !props.canDrag(props.itemData)) {
if(props.dragUndraggable){
debugger;
props.dragUndraggable(props.itemData, monitor.getInitialClientOffset());
}
return false;
}
return true;
}
}
的問題是,monitor.getInitialClientOffset返回null,所以不getInitialSourceClientOffset和getClientOffset?有關如何在這一點上獲得鼠標位置的任何想法?