@vectojs/core 1.7.0 → 1.7.1

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/dist/index.js CHANGED
@@ -480,6 +480,18 @@ var Scene = (_class2 = class _Scene {
480
480
  this.a11yRoot.style.pointerEvents = "none";
481
481
  this.a11yRoot.style.overflow = "hidden";
482
482
  this.a11yRoot.style.zIndex = "10";
483
+ this.a11yRoot.style.userSelect = "text";
484
+ this.a11yRoot.addEventListener("mousedown", (e) => {
485
+ const target = e.target;
486
+ if (target !== this.a11yRoot && target.closest("[data-vecto-content]") && getComputedStyle(target.closest("[data-vecto-content]")).pointerEvents === "auto") {
487
+ this.a11yRoot.style.pointerEvents = "auto";
488
+ }
489
+ });
490
+ const endDrag = () => {
491
+ if (this.a11yRoot) this.a11yRoot.style.pointerEvents = "none";
492
+ };
493
+ this.a11yRoot.addEventListener("mouseup", endDrag);
494
+ this.a11yRoot.addEventListener("mouseleave", endDrag);
483
495
  if (canvas.parentElement) {
484
496
  canvas.parentElement.appendChild(this.a11yRoot);
485
497
  }
@@ -1080,7 +1092,6 @@ var Scene = (_class2 = class _Scene {
1080
1092
  s.forcedColorAdjust = "none";
1081
1093
  s.setProperty("-webkit-text-fill-color", "transparent");
1082
1094
  s.whiteSpace = "pre-wrap";
1083
- s.overflow = "hidden";
1084
1095
  s.zIndex = "0";
1085
1096
  el.addEventListener(
1086
1097
  "wheel",
package/dist/index.mjs CHANGED
@@ -480,6 +480,18 @@ var Scene = class _Scene {
480
480
  this.a11yRoot.style.pointerEvents = "none";
481
481
  this.a11yRoot.style.overflow = "hidden";
482
482
  this.a11yRoot.style.zIndex = "10";
483
+ this.a11yRoot.style.userSelect = "text";
484
+ this.a11yRoot.addEventListener("mousedown", (e) => {
485
+ const target = e.target;
486
+ if (target !== this.a11yRoot && target.closest("[data-vecto-content]") && getComputedStyle(target.closest("[data-vecto-content]")).pointerEvents === "auto") {
487
+ this.a11yRoot.style.pointerEvents = "auto";
488
+ }
489
+ });
490
+ const endDrag = () => {
491
+ if (this.a11yRoot) this.a11yRoot.style.pointerEvents = "none";
492
+ };
493
+ this.a11yRoot.addEventListener("mouseup", endDrag);
494
+ this.a11yRoot.addEventListener("mouseleave", endDrag);
483
495
  if (canvas.parentElement) {
484
496
  canvas.parentElement.appendChild(this.a11yRoot);
485
497
  }
@@ -1080,7 +1092,6 @@ var Scene = class _Scene {
1080
1092
  s.forcedColorAdjust = "none";
1081
1093
  s.setProperty("-webkit-text-fill-color", "transparent");
1082
1094
  s.whiteSpace = "pre-wrap";
1083
- s.overflow = "hidden";
1084
1095
  s.zIndex = "0";
1085
1096
  el.addEventListener(
1086
1097
  "wheel",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vectojs/core",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },