SourceTermAnalysisSystem_vue/node_modules/@antv/x6-common/lib/dom/selection.js
2026-05-15 10:22:44 +08:00

28 lines
815 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.clearSelection = void 0;
exports.clearSelection = (function () {
if (typeof document == 'undefined')
return function () { };
const doc = document;
if (doc.selection) {
return function () {
doc.selection.empty();
};
}
if (window.getSelection) {
return function () {
const selection = window.getSelection();
if (selection) {
if (selection.empty) {
selection.empty();
}
else if (selection.removeAllRanges) {
selection.removeAllRanges();
}
}
};
}
return function () { };
})();
//# sourceMappingURL=selection.js.map