Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | 110x 110x 110x 110x 102x 102x 102x 102x 102x | import mouseDoubleClickListener from './mouseDoubleClickListener'; import mouseDownListener, { mouseDoubleClickIgnoreListener, } from './mouseDownListener'; import mouseMoveListener from './mouseMoveListener'; /** * Removes mouse event listeners for native mouse event. Enables * vtk.js tools flavored events that build on top of existing events to * provide more helpful information. * * @private * @param element - The DOM element to remove event listeners from. */ function disable(element: HTMLDivElement): void { element.removeEventListener('dblclick', mouseDoubleClickListener); element.removeEventListener('mousedown', mouseDownListener); element.removeEventListener('mousemove', mouseMoveListener); // The mouseDoubleClickIgnoreListener prevents those browser 'dblclick' // events that cornerstone has determined are single clicks from propagating // to other (3rd party) listeners. A capture phase listener is used so that // the 'dblclick' event can be ignored and not propagated ASAP. element.removeEventListener('dblclick', mouseDoubleClickIgnoreListener, { capture: true, }); } /** * Registers mouse event listeners for native mouse event. Enables * vtk.js tools flavored events that build on top of existing events to * provide more helpful information. * * @private * @param element - The DOM element to register event listeners on. */ function enable(element: HTMLDivElement): void { // Prevent handlers from being attached multiple times disable(element); element.addEventListener('dblclick', mouseDoubleClickListener); element.addEventListener('mousedown', mouseDownListener); element.addEventListener('mousemove', mouseMoveListener); // The mouseDoubleClickIgnoreListener prevents those browser 'dblclick' // events that cornerstone has determined are single clicks from propagating // to other (3rd party) listeners. A capture phase listener is used so that // the 'dblclick' event can be ignored and not propagated ASAP. element.addEventListener('dblclick', mouseDoubleClickIgnoreListener, { capture: true, }); } export default { enable, disable, }; |