test stop drag propagation
This commit is contained in:
parent
cbe739430f
commit
fe0b18d15e
3
node_modules/react-draggable/lib/Draggable.js
generated
vendored
3
node_modules/react-draggable/lib/Draggable.js
generated
vendored
@ -225,6 +225,7 @@ export default class Draggable extends React.Component<DraggableProps, Draggable
|
||||
}
|
||||
|
||||
onDragStart: DraggableEventHandler = (e, coreData) => {
|
||||
e.stopPropagation();
|
||||
log('Draggable: onDragStart: %j', coreData);
|
||||
|
||||
// Short-circuit if user's callback killed it.
|
||||
@ -236,6 +237,7 @@ export default class Draggable extends React.Component<DraggableProps, Draggable
|
||||
};
|
||||
|
||||
onDrag: DraggableEventHandler = (e, coreData) => {
|
||||
e.stopPropagation();
|
||||
if (!this.state.dragging) return false;
|
||||
log('Draggable: onDrag: %j', coreData);
|
||||
|
||||
@ -281,6 +283,7 @@ export default class Draggable extends React.Component<DraggableProps, Draggable
|
||||
};
|
||||
|
||||
onDragStop: DraggableEventHandler = (e, coreData) => {
|
||||
e.stopPropagation();
|
||||
if (!this.state.dragging) return false;
|
||||
|
||||
// Short-circuit if user's callback killed it.
|
||||
|
3
node_modules/react-draggable/lib/DraggableCore.js
generated
vendored
3
node_modules/react-draggable/lib/DraggableCore.js
generated
vendored
@ -236,6 +236,7 @@ export default class DraggableCore extends React.Component<DraggableCoreProps, D
|
||||
}
|
||||
|
||||
handleDragStart: EventHandler<MouseTouchEvent> = (e) => {
|
||||
e.stopPropagation();
|
||||
// Make it possible to attach event handlers on top of this one.
|
||||
this.props.onMouseDown(e);
|
||||
|
||||
@ -300,6 +301,7 @@ export default class DraggableCore extends React.Component<DraggableCoreProps, D
|
||||
};
|
||||
|
||||
handleDrag: EventHandler<MouseTouchEvent> = (e) => {
|
||||
e.stopPropagation();
|
||||
|
||||
// Prevent scrolling on mobile devices, like ipad/iphone.
|
||||
if (e.type === 'touchmove') e.preventDefault();
|
||||
@ -345,6 +347,7 @@ export default class DraggableCore extends React.Component<DraggableCoreProps, D
|
||||
};
|
||||
|
||||
handleDragStop: EventHandler<MouseTouchEvent> = (e) => {
|
||||
e.stopPropagation();
|
||||
if (!this.state.dragging) return;
|
||||
|
||||
const position = getControlPosition(e, this.state.touchIdentifier, this);
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "v-react-pivottable",
|
||||
"version": "0.11.9",
|
||||
"version": "0.11.10",
|
||||
"description": "A React-based pivot table",
|
||||
"main": "PivotTableUI.js",
|
||||
"files": [
|
||||
|
Loading…
Reference in New Issue
Block a user