site/node_modules/d3-drag/src/noevent.js

14 lines
396 B
JavaScript
Raw Normal View History

2024-10-14 06:09:33 +00:00
// These are typically used in conjunction with noevent to ensure that we can
// preventDefault on the event.
export const nonpassive = {passive: false};
export const nonpassivecapture = {capture: true, passive: false};
export function nopropagation(event) {
event.stopImmediatePropagation();
}
export default function(event) {
event.preventDefault();
event.stopImmediatePropagation();
}