microboard-temp 0.14.0 → 0.14.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/cjs/browser.js +11 -2
- package/dist/cjs/index.js +11 -2
- package/dist/cjs/node.js +11 -2
- package/dist/esm/browser.js +11 -2
- package/dist/esm/index.js +11 -2
- package/dist/esm/node.js +11 -2
- package/dist/types/Items/Connector/Connector.d.ts +1 -0
- package/package.json +1 -1
package/dist/cjs/browser.js
CHANGED
|
@@ -58309,6 +58309,7 @@ var init_Connector = __esm(() => {
|
|
|
58309
58309
|
animationFrameId;
|
|
58310
58310
|
text;
|
|
58311
58311
|
transformationRenderBlock = undefined;
|
|
58312
|
+
_updatingTitle = false;
|
|
58312
58313
|
optionalFindItemFn;
|
|
58313
58314
|
constructor(board, startPoint = new BoardPoint, endPoint = new BoardPoint, lineStyle = "straight", startPointerStyle = "None", endPointerStyle = DEFAULT_END_POINTER, lineColor, lineWidth, strokeStyle, id = "") {
|
|
58314
58315
|
super(board, id);
|
|
@@ -58892,6 +58893,9 @@ var init_Connector = __esm(() => {
|
|
|
58892
58893
|
return items.find((item) => item instanceof Connector2 && item.getId() === connectorId);
|
|
58893
58894
|
}
|
|
58894
58895
|
updateTitle() {
|
|
58896
|
+
if (this._updatingTitle) {
|
|
58897
|
+
return;
|
|
58898
|
+
}
|
|
58895
58899
|
const selection = this.board.selection;
|
|
58896
58900
|
const isConnectorSelected = selection.items.findById(this.id);
|
|
58897
58901
|
if (isConnectorSelected && this.board.selection.getContext() === "EditTextUnderPointer") {
|
|
@@ -58905,8 +58909,13 @@ var init_Connector = __esm(() => {
|
|
|
58905
58909
|
const { x, y } = this.getMiddlePoint() || this.calculateMiddlePoint();
|
|
58906
58910
|
const height = this.text.getHeight();
|
|
58907
58911
|
const width = this.text.getWidth();
|
|
58908
|
-
this.
|
|
58909
|
-
|
|
58912
|
+
this._updatingTitle = true;
|
|
58913
|
+
try {
|
|
58914
|
+
this.text.apply(transformOps.translateTo(this.text, x - width / 2, y - height / 2));
|
|
58915
|
+
this.text.updateElement();
|
|
58916
|
+
} finally {
|
|
58917
|
+
this._updatingTitle = false;
|
|
58918
|
+
}
|
|
58910
58919
|
}
|
|
58911
58920
|
scalePoints() {
|
|
58912
58921
|
const origin = new Point(this.getMbr().left, this.getMbr().top);
|
package/dist/cjs/index.js
CHANGED
|
@@ -58309,6 +58309,7 @@ var init_Connector = __esm(() => {
|
|
|
58309
58309
|
animationFrameId;
|
|
58310
58310
|
text;
|
|
58311
58311
|
transformationRenderBlock = undefined;
|
|
58312
|
+
_updatingTitle = false;
|
|
58312
58313
|
optionalFindItemFn;
|
|
58313
58314
|
constructor(board, startPoint = new BoardPoint, endPoint = new BoardPoint, lineStyle = "straight", startPointerStyle = "None", endPointerStyle = DEFAULT_END_POINTER, lineColor, lineWidth, strokeStyle, id = "") {
|
|
58314
58315
|
super(board, id);
|
|
@@ -58892,6 +58893,9 @@ var init_Connector = __esm(() => {
|
|
|
58892
58893
|
return items.find((item) => item instanceof Connector2 && item.getId() === connectorId);
|
|
58893
58894
|
}
|
|
58894
58895
|
updateTitle() {
|
|
58896
|
+
if (this._updatingTitle) {
|
|
58897
|
+
return;
|
|
58898
|
+
}
|
|
58895
58899
|
const selection = this.board.selection;
|
|
58896
58900
|
const isConnectorSelected = selection.items.findById(this.id);
|
|
58897
58901
|
if (isConnectorSelected && this.board.selection.getContext() === "EditTextUnderPointer") {
|
|
@@ -58905,8 +58909,13 @@ var init_Connector = __esm(() => {
|
|
|
58905
58909
|
const { x, y } = this.getMiddlePoint() || this.calculateMiddlePoint();
|
|
58906
58910
|
const height = this.text.getHeight();
|
|
58907
58911
|
const width = this.text.getWidth();
|
|
58908
|
-
this.
|
|
58909
|
-
|
|
58912
|
+
this._updatingTitle = true;
|
|
58913
|
+
try {
|
|
58914
|
+
this.text.apply(transformOps.translateTo(this.text, x - width / 2, y - height / 2));
|
|
58915
|
+
this.text.updateElement();
|
|
58916
|
+
} finally {
|
|
58917
|
+
this._updatingTitle = false;
|
|
58918
|
+
}
|
|
58910
58919
|
}
|
|
58911
58920
|
scalePoints() {
|
|
58912
58921
|
const origin = new Point(this.getMbr().left, this.getMbr().top);
|
package/dist/cjs/node.js
CHANGED
|
@@ -60729,6 +60729,7 @@ var init_Connector = __esm(() => {
|
|
|
60729
60729
|
animationFrameId;
|
|
60730
60730
|
text;
|
|
60731
60731
|
transformationRenderBlock = undefined;
|
|
60732
|
+
_updatingTitle = false;
|
|
60732
60733
|
optionalFindItemFn;
|
|
60733
60734
|
constructor(board, startPoint = new BoardPoint, endPoint = new BoardPoint, lineStyle = "straight", startPointerStyle = "None", endPointerStyle = DEFAULT_END_POINTER, lineColor, lineWidth, strokeStyle, id = "") {
|
|
60734
60735
|
super(board, id);
|
|
@@ -61312,6 +61313,9 @@ var init_Connector = __esm(() => {
|
|
|
61312
61313
|
return items.find((item) => item instanceof Connector2 && item.getId() === connectorId);
|
|
61313
61314
|
}
|
|
61314
61315
|
updateTitle() {
|
|
61316
|
+
if (this._updatingTitle) {
|
|
61317
|
+
return;
|
|
61318
|
+
}
|
|
61315
61319
|
const selection = this.board.selection;
|
|
61316
61320
|
const isConnectorSelected = selection.items.findById(this.id);
|
|
61317
61321
|
if (isConnectorSelected && this.board.selection.getContext() === "EditTextUnderPointer") {
|
|
@@ -61325,8 +61329,13 @@ var init_Connector = __esm(() => {
|
|
|
61325
61329
|
const { x, y } = this.getMiddlePoint() || this.calculateMiddlePoint();
|
|
61326
61330
|
const height = this.text.getHeight();
|
|
61327
61331
|
const width = this.text.getWidth();
|
|
61328
|
-
this.
|
|
61329
|
-
|
|
61332
|
+
this._updatingTitle = true;
|
|
61333
|
+
try {
|
|
61334
|
+
this.text.apply(transformOps.translateTo(this.text, x - width / 2, y - height / 2));
|
|
61335
|
+
this.text.updateElement();
|
|
61336
|
+
} finally {
|
|
61337
|
+
this._updatingTitle = false;
|
|
61338
|
+
}
|
|
61330
61339
|
}
|
|
61331
61340
|
scalePoints() {
|
|
61332
61341
|
const origin = new Point(this.getMbr().left, this.getMbr().top);
|
package/dist/esm/browser.js
CHANGED
|
@@ -58246,6 +58246,7 @@ var init_Connector = __esm(() => {
|
|
|
58246
58246
|
animationFrameId;
|
|
58247
58247
|
text;
|
|
58248
58248
|
transformationRenderBlock = undefined;
|
|
58249
|
+
_updatingTitle = false;
|
|
58249
58250
|
optionalFindItemFn;
|
|
58250
58251
|
constructor(board, startPoint = new BoardPoint, endPoint = new BoardPoint, lineStyle = "straight", startPointerStyle = "None", endPointerStyle = DEFAULT_END_POINTER, lineColor, lineWidth, strokeStyle, id = "") {
|
|
58251
58252
|
super(board, id);
|
|
@@ -58829,6 +58830,9 @@ var init_Connector = __esm(() => {
|
|
|
58829
58830
|
return items.find((item) => item instanceof Connector2 && item.getId() === connectorId);
|
|
58830
58831
|
}
|
|
58831
58832
|
updateTitle() {
|
|
58833
|
+
if (this._updatingTitle) {
|
|
58834
|
+
return;
|
|
58835
|
+
}
|
|
58832
58836
|
const selection = this.board.selection;
|
|
58833
58837
|
const isConnectorSelected = selection.items.findById(this.id);
|
|
58834
58838
|
if (isConnectorSelected && this.board.selection.getContext() === "EditTextUnderPointer") {
|
|
@@ -58842,8 +58846,13 @@ var init_Connector = __esm(() => {
|
|
|
58842
58846
|
const { x, y } = this.getMiddlePoint() || this.calculateMiddlePoint();
|
|
58843
58847
|
const height = this.text.getHeight();
|
|
58844
58848
|
const width = this.text.getWidth();
|
|
58845
|
-
this.
|
|
58846
|
-
|
|
58849
|
+
this._updatingTitle = true;
|
|
58850
|
+
try {
|
|
58851
|
+
this.text.apply(transformOps.translateTo(this.text, x - width / 2, y - height / 2));
|
|
58852
|
+
this.text.updateElement();
|
|
58853
|
+
} finally {
|
|
58854
|
+
this._updatingTitle = false;
|
|
58855
|
+
}
|
|
58847
58856
|
}
|
|
58848
58857
|
scalePoints() {
|
|
58849
58858
|
const origin = new Point(this.getMbr().left, this.getMbr().top);
|
package/dist/esm/index.js
CHANGED
|
@@ -58239,6 +58239,7 @@ var init_Connector = __esm(() => {
|
|
|
58239
58239
|
animationFrameId;
|
|
58240
58240
|
text;
|
|
58241
58241
|
transformationRenderBlock = undefined;
|
|
58242
|
+
_updatingTitle = false;
|
|
58242
58243
|
optionalFindItemFn;
|
|
58243
58244
|
constructor(board, startPoint = new BoardPoint, endPoint = new BoardPoint, lineStyle = "straight", startPointerStyle = "None", endPointerStyle = DEFAULT_END_POINTER, lineColor, lineWidth, strokeStyle, id = "") {
|
|
58244
58245
|
super(board, id);
|
|
@@ -58822,6 +58823,9 @@ var init_Connector = __esm(() => {
|
|
|
58822
58823
|
return items.find((item) => item instanceof Connector2 && item.getId() === connectorId);
|
|
58823
58824
|
}
|
|
58824
58825
|
updateTitle() {
|
|
58826
|
+
if (this._updatingTitle) {
|
|
58827
|
+
return;
|
|
58828
|
+
}
|
|
58825
58829
|
const selection = this.board.selection;
|
|
58826
58830
|
const isConnectorSelected = selection.items.findById(this.id);
|
|
58827
58831
|
if (isConnectorSelected && this.board.selection.getContext() === "EditTextUnderPointer") {
|
|
@@ -58835,8 +58839,13 @@ var init_Connector = __esm(() => {
|
|
|
58835
58839
|
const { x, y } = this.getMiddlePoint() || this.calculateMiddlePoint();
|
|
58836
58840
|
const height = this.text.getHeight();
|
|
58837
58841
|
const width = this.text.getWidth();
|
|
58838
|
-
this.
|
|
58839
|
-
|
|
58842
|
+
this._updatingTitle = true;
|
|
58843
|
+
try {
|
|
58844
|
+
this.text.apply(transformOps.translateTo(this.text, x - width / 2, y - height / 2));
|
|
58845
|
+
this.text.updateElement();
|
|
58846
|
+
} finally {
|
|
58847
|
+
this._updatingTitle = false;
|
|
58848
|
+
}
|
|
58840
58849
|
}
|
|
58841
58850
|
scalePoints() {
|
|
58842
58851
|
const origin = new Point(this.getMbr().left, this.getMbr().top);
|
package/dist/esm/node.js
CHANGED
|
@@ -60648,6 +60648,7 @@ var init_Connector = __esm(() => {
|
|
|
60648
60648
|
animationFrameId;
|
|
60649
60649
|
text;
|
|
60650
60650
|
transformationRenderBlock = undefined;
|
|
60651
|
+
_updatingTitle = false;
|
|
60651
60652
|
optionalFindItemFn;
|
|
60652
60653
|
constructor(board, startPoint = new BoardPoint, endPoint = new BoardPoint, lineStyle = "straight", startPointerStyle = "None", endPointerStyle = DEFAULT_END_POINTER, lineColor, lineWidth, strokeStyle, id = "") {
|
|
60653
60654
|
super(board, id);
|
|
@@ -61231,6 +61232,9 @@ var init_Connector = __esm(() => {
|
|
|
61231
61232
|
return items.find((item) => item instanceof Connector2 && item.getId() === connectorId);
|
|
61232
61233
|
}
|
|
61233
61234
|
updateTitle() {
|
|
61235
|
+
if (this._updatingTitle) {
|
|
61236
|
+
return;
|
|
61237
|
+
}
|
|
61234
61238
|
const selection = this.board.selection;
|
|
61235
61239
|
const isConnectorSelected = selection.items.findById(this.id);
|
|
61236
61240
|
if (isConnectorSelected && this.board.selection.getContext() === "EditTextUnderPointer") {
|
|
@@ -61244,8 +61248,13 @@ var init_Connector = __esm(() => {
|
|
|
61244
61248
|
const { x, y } = this.getMiddlePoint() || this.calculateMiddlePoint();
|
|
61245
61249
|
const height = this.text.getHeight();
|
|
61246
61250
|
const width = this.text.getWidth();
|
|
61247
|
-
this.
|
|
61248
|
-
|
|
61251
|
+
this._updatingTitle = true;
|
|
61252
|
+
try {
|
|
61253
|
+
this.text.apply(transformOps.translateTo(this.text, x - width / 2, y - height / 2));
|
|
61254
|
+
this.text.updateElement();
|
|
61255
|
+
} finally {
|
|
61256
|
+
this._updatingTitle = false;
|
|
61257
|
+
}
|
|
61249
61258
|
}
|
|
61250
61259
|
scalePoints() {
|
|
61251
61260
|
const origin = new Point(this.getMbr().left, this.getMbr().top);
|
|
@@ -40,6 +40,7 @@ export declare class Connector extends BaseItem<Connector> {
|
|
|
40
40
|
animationFrameId?: number;
|
|
41
41
|
readonly text: RichText;
|
|
42
42
|
transformationRenderBlock?: boolean;
|
|
43
|
+
private _updatingTitle;
|
|
43
44
|
private optionalFindItemFn?;
|
|
44
45
|
constructor(board: Board, startPoint?: ControlPoint, endPoint?: ControlPoint, lineStyle?: ConnectorLineStyle, startPointerStyle?: ConnectorPointerStyle, endPointerStyle?: ConnectorPointerStyle, lineColor?: ColorValue, lineWidth?: ConnectionLineWidth, strokeStyle?: BorderStyle, id?: string);
|
|
45
46
|
private initText;
|