@teachinglab/omd 0.7.25 → 0.7.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/canvas/core/omdCanvas.js +5 -0
- package/canvas/ui/cursor.js +9 -0
- package/package.json +1 -1
package/canvas/core/omdCanvas.js
CHANGED
|
@@ -202,6 +202,11 @@ export class omdCanvas {
|
|
|
202
202
|
this.focusFrameManager = new FocusFrameManager(this);
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
+
// Keep the custom cursor above toolbar/buttons and all other SVG UI.
|
|
206
|
+
if (this.cursor && this.svg) {
|
|
207
|
+
this.cursor.attachTo(this.svg);
|
|
208
|
+
}
|
|
209
|
+
|
|
205
210
|
// Apply any selection styles defined in config to the ResizeHandleManager
|
|
206
211
|
// (PointerTool registers the manager on canvas.resizeHandleManager during its constructor)
|
|
207
212
|
if (this.resizeHandleManager && this.config.selection) {
|
package/canvas/ui/cursor.js
CHANGED
|
@@ -461,4 +461,13 @@ export class Cursor {
|
|
|
461
461
|
this.element.parentNode.removeChild(this.element);
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* Reattach the cursor element to a specific parent so it can sit above other SVG UI.
|
|
467
|
+
* @param {SVGElement} parent
|
|
468
|
+
*/
|
|
469
|
+
attachTo(parent) {
|
|
470
|
+
if (!parent || !this.element) return;
|
|
471
|
+
parent.appendChild(this.element);
|
|
472
|
+
}
|
|
464
473
|
}
|