(doc?: Document)
| 36 | } |
| 37 | |
| 38 | export function removeUserSelectStyles(doc?: Document) { |
| 39 | if (!doc) return; |
| 40 | if (doc.body) { |
| 41 | doc.body.classList.remove("use-drag-transparent-selection"); |
| 42 | } |
| 43 | const selection = (doc.defaultView || window).getSelection(); |
| 44 | if (selection && selection.type !== "Caret") { |
| 45 | selection.removeAllRanges(); |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | function createDraggableEvent({ |
| 50 | curPoint, |