Skip to content

Commit

Permalink
fix: restore to last cursor not default (#5553)
Browse files Browse the repository at this point in the history
  • Loading branch information
Deathsteps authored Sep 18, 2023
1 parent f400dcd commit e688283
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/interaction/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -451,11 +451,14 @@ export function setCursor(root, cursor) {
// @ts-ignore
const canvas = root.getRootNode().defaultView;
const dom = canvas.getContextService().getDomElement();
if (dom?.style) dom.style.cursor = cursor;
if (dom?.style) {
root.cursor = dom.style.cursor;
dom.style.cursor = cursor;
}
}

export function restoreCursor(root) {
setCursor(root, 'default');
setCursor(root, root.cursor);
}

export function selectElementByData(elements, data, datum) {
Expand Down

0 comments on commit e688283

Please sign in to comment.