Files
railwaysystem/RuoYi-Vue/ruoyi-ui/node_modules2/@antv/x6-common/es/dom/selection.js
T
2026-09-10 15:40:10 +08:00

25 lines
710 B
JavaScript

export const 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