react-easy-panzoom
Version:
Wrapper to enable pan and zoom for any React component
24 lines (17 loc) • 649 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.releaseTextSelection = exports.captureTextSelection = exports.preventDefault = void 0;
var preventDefault = function preventDefault(e) {
e.preventDefault();
};
exports.preventDefault = preventDefault;
var captureTextSelection = function captureTextSelection() {
window.addEventListener('selectstart', preventDefault);
};
exports.captureTextSelection = captureTextSelection;
var releaseTextSelection = function releaseTextSelection() {
window.removeEventListener('selectstart', preventDefault);
};
exports.releaseTextSelection = releaseTextSelection;