@8btc/whiteboard 0.0.20-alpha.24 → 0.0.20-alpha.25
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 +13 -17
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -541,8 +541,7 @@ function Ke(n, e) {
|
|
|
541
541
|
...n,
|
|
542
542
|
...o,
|
|
543
543
|
name: `${T.nodeRoot} ${T.selectable} ${T.image}`,
|
|
544
|
-
draggable: !0
|
|
545
|
-
listening: n.$_listening ?? !0
|
|
544
|
+
draggable: !0
|
|
546
545
|
};
|
|
547
546
|
}
|
|
548
547
|
function qe(n, e) {
|
|
@@ -555,8 +554,7 @@ function qe(n, e) {
|
|
|
555
554
|
...n,
|
|
556
555
|
...o,
|
|
557
556
|
name: `${T.nodeRoot} ${T.selectable} ${T.video}`,
|
|
558
|
-
draggable: !0
|
|
559
|
-
listening: n.$_listening ?? !0
|
|
557
|
+
draggable: !0
|
|
560
558
|
};
|
|
561
559
|
}
|
|
562
560
|
function je(n, e) {
|
|
@@ -577,8 +575,7 @@ function Je(n, e) {
|
|
|
577
575
|
width: t,
|
|
578
576
|
height: i,
|
|
579
577
|
name: `${T.nodeRoot} ${T.selectable} ${T.html}`,
|
|
580
|
-
draggable: !0
|
|
581
|
-
listening: n.$_listening ?? !0
|
|
578
|
+
draggable: !0
|
|
582
579
|
};
|
|
583
580
|
}
|
|
584
581
|
function Qe(n, e) {
|
|
@@ -602,8 +599,7 @@ function ti(n, e) {
|
|
|
602
599
|
...n,
|
|
603
600
|
...t,
|
|
604
601
|
name: `${T.nodeRoot} ${T.selectable} ${T.richText}`,
|
|
605
|
-
draggable: !0
|
|
606
|
-
listening: n.$_listening ?? !0
|
|
602
|
+
draggable: !0
|
|
607
603
|
};
|
|
608
604
|
}
|
|
609
605
|
const di = /* @__PURE__ */ new WeakMap();
|
|
@@ -630,7 +626,7 @@ class Kn extends yt {
|
|
|
630
626
|
C(this, "isDraft");
|
|
631
627
|
f(this, Rt, (t) => {
|
|
632
628
|
const i = t === "select";
|
|
633
|
-
this.element.listening(this.config.$_listening ??
|
|
629
|
+
this.element.listening(i && (this.config.$_listening ?? !0));
|
|
634
630
|
});
|
|
635
631
|
this.core = t, this.config = Ge(i, this.core.getTheme()), this.element = this.createElement(), Ct(this.element, this), this.isDraft = o, _(this, ae, gi).call(this);
|
|
636
632
|
}
|
|
@@ -697,7 +693,7 @@ class qn extends yt {
|
|
|
697
693
|
C(this, "isDraft");
|
|
698
694
|
f(this, $t, (t) => {
|
|
699
695
|
const i = t === "select";
|
|
700
|
-
this.element.listening(this.config.$_listening ??
|
|
696
|
+
this.element.listening(i && (this.config.$_listening ?? !0));
|
|
701
697
|
});
|
|
702
698
|
f(this, Ft, () => {
|
|
703
699
|
const t = this.getElement().getLayer();
|
|
@@ -967,7 +963,7 @@ class Jn extends yt {
|
|
|
967
963
|
});
|
|
968
964
|
f(this, At, (t) => {
|
|
969
965
|
const i = t === "select";
|
|
970
|
-
this.element.listening(this.config.$_listening ??
|
|
966
|
+
this.element.listening(i && (this.config.$_listening ?? !0));
|
|
971
967
|
});
|
|
972
968
|
this.core = t, this.config = Je(i, this.core.getTheme()), this.element = this.createElement(), Ct(this.element, this), this.isDraft = o, this.htmlElement = document.createElement("div"), this.htmlElement.style.position = "absolute", this.htmlElement.style.pointerEvents = "none", this.htmlElement.innerHTML = this.config.$_htmlContent, this.core.getContainer().appendChild(this.htmlElement), setTimeout(() => {
|
|
973
969
|
r(this, rt).call(this);
|
|
@@ -1039,7 +1035,7 @@ class Qn extends yt {
|
|
|
1039
1035
|
C(this, "rect");
|
|
1040
1036
|
f(this, Ht, (t) => {
|
|
1041
1037
|
const i = t === "select";
|
|
1042
|
-
this.element.listening(this.config.$_listening ??
|
|
1038
|
+
this.element.listening(i && (this.config.$_listening ?? !0));
|
|
1043
1039
|
});
|
|
1044
1040
|
/**
|
|
1045
1041
|
* 编辑文字
|
|
@@ -1211,7 +1207,7 @@ class to extends yt {
|
|
|
1211
1207
|
});
|
|
1212
1208
|
f(this, Lt, (t) => {
|
|
1213
1209
|
const i = t === "select";
|
|
1214
|
-
this.element.listening(this.config.$_listening ??
|
|
1210
|
+
this.element.listening(i && (this.config.$_listening ?? !0));
|
|
1215
1211
|
});
|
|
1216
1212
|
f(this, Dt, (t) => {
|
|
1217
1213
|
const i = this.element.getClientRect();
|
|
@@ -1306,7 +1302,7 @@ class eo extends yt {
|
|
|
1306
1302
|
C(this, "isDraft");
|
|
1307
1303
|
f(this, Ot, (t) => {
|
|
1308
1304
|
const i = t === "select";
|
|
1309
|
-
this.element.listening(this.config.$_listening ??
|
|
1305
|
+
this.element.listening(i && (this.config.$_listening ?? !0));
|
|
1310
1306
|
});
|
|
1311
1307
|
f(this, Pt, () => {
|
|
1312
1308
|
this.getElement().getLayer() && this.core._rebuildStateAfterNodeChange([this], !0);
|
|
@@ -1714,7 +1710,7 @@ class so extends zn {
|
|
|
1714
1710
|
for (const h of a) {
|
|
1715
1711
|
const l = h.x(), d = h.y(), m = h.width(), u = h.height();
|
|
1716
1712
|
if (t.x >= l && t.x <= l + m && t.y >= d && t.y <= d + u)
|
|
1717
|
-
return h.
|
|
1713
|
+
return h.getAttr("$_type") === "image" ? h : null;
|
|
1718
1714
|
}
|
|
1719
1715
|
return null;
|
|
1720
1716
|
}
|
|
@@ -2316,8 +2312,8 @@ class ro extends so {
|
|
|
2316
2312
|
this._selectNodes([]);
|
|
2317
2313
|
const t = this.getStage().findOne(`#${e}`);
|
|
2318
2314
|
if (t) {
|
|
2319
|
-
const i = !t.
|
|
2320
|
-
this.updateNodes([e],
|
|
2315
|
+
const i = {}, o = !(t.getAttr("$_listening") ?? !0);
|
|
2316
|
+
i.$_listening = o, this.getToolType() === "select" && (i.listening = o), this.updateNodes([e], i);
|
|
2321
2317
|
}
|
|
2322
2318
|
}
|
|
2323
2319
|
}
|