microboard-temp 0.1.27 → 0.2.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 +38 -33
- package/dist/cjs/index.js +38 -33
- package/dist/cjs/node.js +38 -33
- package/dist/esm/browser.js +38 -33
- package/dist/esm/index.js +38 -33
- package/dist/esm/node.js +38 -33
- package/dist/types/Events/SyncLog.d.ts +3 -3
- package/dist/types/Keyboard/types.d.ts +2 -2
- package/dist/types/Settings.d.ts +2 -1
- package/dist/types/Tools/Eraser/Eraser.d.ts +5 -5
- package/dist/types/api/isIfarme.d.ts +1 -0
- package/dist/types/ts-error-prioritizer.d.ts +1 -0
- package/package.json +1 -1
package/dist/cjs/browser.js
CHANGED
|
@@ -637,7 +637,7 @@ __export(exports_browser, {
|
|
|
637
637
|
transformHtmlOrTextToMarkdown: () => transformHtmlOrTextToMarkdown,
|
|
638
638
|
toRelativePoint: () => toRelativePoint,
|
|
639
639
|
toFiniteNumber: () => toFiniteNumber,
|
|
640
|
-
tempStorage: () =>
|
|
640
|
+
tempStorage: () => tempStorage,
|
|
641
641
|
tagByType: () => tagByType,
|
|
642
642
|
stickerColors: () => stickerColors,
|
|
643
643
|
sha256: () => sha256,
|
|
@@ -708,7 +708,7 @@ __export(exports_browser, {
|
|
|
708
708
|
Shapes: () => Shapes,
|
|
709
709
|
ShapeCommand: () => ShapeCommand,
|
|
710
710
|
Shape: () => Shape,
|
|
711
|
-
SessionStorage: () =>
|
|
711
|
+
SessionStorage: () => SessionStorage,
|
|
712
712
|
Selection: () => BoardSelection,
|
|
713
713
|
STEP_STROKE_WIDTH: () => STEP_STROKE_WIDTH,
|
|
714
714
|
SHAPE_LAST_TYPE_KEY: () => SHAPE_LAST_TYPE_KEY,
|
|
@@ -8609,7 +8609,7 @@ if (typeof window !== "undefined" && window.sessionStorage) {
|
|
|
8609
8609
|
_sessionStorage = new NodeStoragePolyfill;
|
|
8610
8610
|
}
|
|
8611
8611
|
|
|
8612
|
-
class
|
|
8612
|
+
class SessionStorage {
|
|
8613
8613
|
set(key, value) {
|
|
8614
8614
|
const boardId = this.getBoardId() || "";
|
|
8615
8615
|
_sessionStorage.setItem(boardId + "_" + key, JSON.stringify(value));
|
|
@@ -8741,7 +8741,7 @@ class SessionStorage2 {
|
|
|
8741
8741
|
return window.location.href.split("/").pop()?.split("?")[0];
|
|
8742
8742
|
}
|
|
8743
8743
|
}
|
|
8744
|
-
var
|
|
8744
|
+
var tempStorage = new SessionStorage;
|
|
8745
8745
|
|
|
8746
8746
|
// src/HTMLRender/HTMLRender.ts
|
|
8747
8747
|
function getTranslationFromHTML(el) {
|
|
@@ -18317,7 +18317,7 @@ class RichText extends Mbr {
|
|
|
18317
18317
|
counter = counter + 1;
|
|
18318
18318
|
this.rtCounter = counter;
|
|
18319
18319
|
this.linkTo = linkTo || new LinkTo(this.id, this.board.events);
|
|
18320
|
-
let textSizeFromStorage = new
|
|
18320
|
+
let textSizeFromStorage = new SessionStorage().getFontSize(insideOf || "RichText");
|
|
18321
18321
|
if (!textSizeFromStorage || textSizeFromStorage === "auto") {
|
|
18322
18322
|
textSizeFromStorage = initialTextStyles.fontSize;
|
|
18323
18323
|
}
|
|
@@ -37202,7 +37202,7 @@ class Shape extends BaseItem {
|
|
|
37202
37202
|
this.updateMbr();
|
|
37203
37203
|
}
|
|
37204
37204
|
saveShapeData() {
|
|
37205
|
-
|
|
37205
|
+
tempStorage.setShapeData({
|
|
37206
37206
|
shapeType: this.shapeType,
|
|
37207
37207
|
backgroundColor: this.backgroundColor,
|
|
37208
37208
|
backgroundOpacity: this.backgroundOpacity,
|
|
@@ -37743,7 +37743,7 @@ class Sticker extends BaseItem {
|
|
|
37743
37743
|
}
|
|
37744
37744
|
}
|
|
37745
37745
|
saveStickerData() {
|
|
37746
|
-
const storage = new
|
|
37746
|
+
const storage = new SessionStorage;
|
|
37747
37747
|
storage.setStickerData(this.serialize());
|
|
37748
37748
|
}
|
|
37749
37749
|
serialize() {
|
|
@@ -38256,8 +38256,8 @@ class Frame extends BaseItem {
|
|
|
38256
38256
|
this.borderWidth = borderWidth;
|
|
38257
38257
|
this.textContainer = Frames[this.shapeType].textBounds.copy();
|
|
38258
38258
|
this.path = Frames[this.shapeType].path.copy();
|
|
38259
|
-
this.transformation = new Transformation(this.id,
|
|
38260
|
-
this.linkTo = new LinkTo(this.id,
|
|
38259
|
+
this.transformation = new Transformation(this.id, board.events);
|
|
38260
|
+
this.linkTo = new LinkTo(this.id, board.events);
|
|
38261
38261
|
this.text = new RichText(board, this.textContainer, this.id, this.transformation, this.linkTo, this.name, true, false, "Frame", { ...conf.DEFAULT_TEXT_STYLES, fontColor: FRAME_TITLE_COLOR });
|
|
38262
38262
|
this.text.setSelectionHorisontalAlignment("left");
|
|
38263
38263
|
this.transformation.subject.subscribe(() => {
|
|
@@ -39168,7 +39168,7 @@ function calculatePosition(boardImage, board) {
|
|
|
39168
39168
|
const centerPoint = viewportMbr.getCenter();
|
|
39169
39169
|
const imageWidth = boardImage.getWidth();
|
|
39170
39170
|
const imageHeight = boardImage.getHeight();
|
|
39171
|
-
const prevDimensions =
|
|
39171
|
+
const prevDimensions = tempStorage.getImageDimensions();
|
|
39172
39172
|
if (prevDimensions) {
|
|
39173
39173
|
const scaleX2 = prevDimensions.width / imageWidth;
|
|
39174
39174
|
const scaleY2 = prevDimensions.height / imageHeight;
|
|
@@ -39189,7 +39189,7 @@ function calculatePosition(boardImage, board) {
|
|
|
39189
39189
|
const finalScale = scaleToFit;
|
|
39190
39190
|
const scaledImageWidth = imageWidth * finalScale;
|
|
39191
39191
|
const scaledImageHeight = imageHeight * finalScale;
|
|
39192
|
-
|
|
39192
|
+
tempStorage.setImageDimensions({
|
|
39193
39193
|
width: scaledImageWidth,
|
|
39194
39194
|
height: scaledImageHeight
|
|
39195
39195
|
});
|
|
@@ -42232,7 +42232,7 @@ class AddShape extends BoardTool {
|
|
|
42232
42232
|
constructor(board) {
|
|
42233
42233
|
super(board);
|
|
42234
42234
|
this.setCursor();
|
|
42235
|
-
const data =
|
|
42235
|
+
const data = tempStorage.getShapeData();
|
|
42236
42236
|
if (data) {
|
|
42237
42237
|
this.shape = new Shape(board, "", data.shapeType, data.backgroundColor, data.backgroundOpacity, data.borderColor, data.borderOpacity, data.borderStyle, data.borderWidth);
|
|
42238
42238
|
this.setShapeType(data.shapeType);
|
|
@@ -42313,13 +42313,13 @@ class AddShape extends BoardTool {
|
|
|
42313
42313
|
if (this.type === "None") {
|
|
42314
42314
|
return false;
|
|
42315
42315
|
}
|
|
42316
|
-
const width2 = this.bounds.getWidth() < 2 ?
|
|
42317
|
-
const height2 = this.bounds.getHeight() < 2 ?
|
|
42316
|
+
const width2 = this.bounds.getWidth() < 2 ? tempStorage.getShapeWidth() || 100 : this.bounds.getWidth();
|
|
42317
|
+
const height2 = this.bounds.getHeight() < 2 ? tempStorage.getShapeHeight() || 100 : this.bounds.getHeight();
|
|
42318
42318
|
if (this.bounds.getWidth() > 2) {
|
|
42319
|
-
|
|
42319
|
+
tempStorage.setShapeWidth(this.bounds.getWidth());
|
|
42320
42320
|
}
|
|
42321
42321
|
if (this.bounds.getHeight() > 2) {
|
|
42322
|
-
|
|
42322
|
+
tempStorage.setShapeHeight(this.bounds.getHeight());
|
|
42323
42323
|
}
|
|
42324
42324
|
this.initTransformation(width2 / 100, height2 / 100);
|
|
42325
42325
|
const shape = this.board.add(this.shape);
|
|
@@ -43507,7 +43507,7 @@ function getQuickAddButtons(selection, board) {
|
|
|
43507
43507
|
let htmlButtons = undefined;
|
|
43508
43508
|
let quickAddItems = undefined;
|
|
43509
43509
|
function calculateQuickAddPosition(index2, selectedItem, connectorStartPoint) {
|
|
43510
|
-
const connectorStorage = new
|
|
43510
|
+
const connectorStorage = new SessionStorage;
|
|
43511
43511
|
const currMbr = selectedItem.getMbr();
|
|
43512
43512
|
const selectedItemData = selectedItem.serialize();
|
|
43513
43513
|
const width2 = selectedItem.itemType === "Shape" ? selectedItem.getPath().getMbr().getWidth() : currMbr.getWidth();
|
|
@@ -43570,7 +43570,7 @@ function getQuickAddButtons(selection, board) {
|
|
|
43570
43570
|
const fontSize = selectedItem.itemType === "RichText" ? selectedItem.getFontSize() : 14;
|
|
43571
43571
|
const newItem = board.createItem(board.getNewItemId(), newItemData);
|
|
43572
43572
|
if (newItem.itemType === "RichText") {
|
|
43573
|
-
const storage = new
|
|
43573
|
+
const storage = new SessionStorage;
|
|
43574
43574
|
storage.setFontSize("RichText", fontSize);
|
|
43575
43575
|
newItem.editor.selectWholeText();
|
|
43576
43576
|
newItem.applySelectionFontSize(fontSize);
|
|
@@ -45117,6 +45117,11 @@ class StickerTool extends CustomTool {
|
|
|
45117
45117
|
}
|
|
45118
45118
|
}
|
|
45119
45119
|
|
|
45120
|
+
// src/api/isIfarme.ts
|
|
45121
|
+
var isIframe = () => {
|
|
45122
|
+
return window.self !== window.top;
|
|
45123
|
+
};
|
|
45124
|
+
|
|
45120
45125
|
// src/Tools/Tools.ts
|
|
45121
45126
|
var registeredTools = {};
|
|
45122
45127
|
|
|
@@ -48018,7 +48023,7 @@ class Presence {
|
|
|
48018
48023
|
if (!ctx) {
|
|
48019
48024
|
return;
|
|
48020
48025
|
}
|
|
48021
|
-
const anonTranslate = i18n.t("presence.anonymous");
|
|
48026
|
+
const anonTranslate = conf.i18n.t("presence.anonymous");
|
|
48022
48027
|
const label = cursor.nickname === "Anonymous" ? anonTranslate : cursor.nickname;
|
|
48023
48028
|
const textWidth = ctx.measureText(label).width;
|
|
48024
48029
|
const labelHeight = 20 * scale;
|
|
@@ -50360,7 +50365,7 @@ function transformItems({
|
|
|
50360
50365
|
return null;
|
|
50361
50366
|
}
|
|
50362
50367
|
if (single instanceof ImageItem) {
|
|
50363
|
-
|
|
50368
|
+
tempStorage.setImageDimensions({
|
|
50364
50369
|
width: resize.mbr.getWidth(),
|
|
50365
50370
|
height: resize.mbr.getHeight()
|
|
50366
50371
|
});
|
|
@@ -51119,12 +51124,12 @@ class BoardSelection {
|
|
|
51119
51124
|
return;
|
|
51120
51125
|
}
|
|
51121
51126
|
if (text5.isEmpty()) {
|
|
51122
|
-
const textColor =
|
|
51123
|
-
const textSize =
|
|
51124
|
-
const highlightColor =
|
|
51125
|
-
const styles =
|
|
51126
|
-
const horizontalAlignment =
|
|
51127
|
-
const verticalAlignment =
|
|
51127
|
+
const textColor = tempStorage.getFontColor(item.itemType);
|
|
51128
|
+
const textSize = tempStorage.getFontSize(item.itemType);
|
|
51129
|
+
const highlightColor = tempStorage.getFontHighlight(item.itemType);
|
|
51130
|
+
const styles = tempStorage.getFontStyles(item.itemType);
|
|
51131
|
+
const horizontalAlignment = tempStorage.getHorizontalAlignment(item.itemType);
|
|
51132
|
+
const verticalAlignment = tempStorage.getVerticalAlignment(item.itemType);
|
|
51128
51133
|
if (textColor) {
|
|
51129
51134
|
text5.setSelectionFontColor(textColor, "None");
|
|
51130
51135
|
}
|
|
@@ -51667,9 +51672,9 @@ class BoardSelection {
|
|
|
51667
51672
|
ops
|
|
51668
51673
|
});
|
|
51669
51674
|
if (item.itemType === "Sticker" && fontSize === "auto") {
|
|
51670
|
-
|
|
51675
|
+
tempStorage.remove(`fontSize_${item.itemType}`);
|
|
51671
51676
|
} else if (item.itemType !== "AINode") {
|
|
51672
|
-
|
|
51677
|
+
tempStorage.setFontSize(item.itemType, fontSize);
|
|
51673
51678
|
}
|
|
51674
51679
|
}
|
|
51675
51680
|
const emptyOps = itemsOps.filter((op) => !op.ops.length);
|
|
@@ -51707,7 +51712,7 @@ class BoardSelection {
|
|
|
51707
51712
|
ops
|
|
51708
51713
|
});
|
|
51709
51714
|
if (item.itemType !== "AINode") {
|
|
51710
|
-
|
|
51715
|
+
tempStorage.setFontStyles(item.itemType, text5.getFontStyles());
|
|
51711
51716
|
}
|
|
51712
51717
|
}
|
|
51713
51718
|
this.emitApplied({
|
|
@@ -51733,7 +51738,7 @@ class BoardSelection {
|
|
|
51733
51738
|
selection: text5.editor.getSelection(),
|
|
51734
51739
|
ops
|
|
51735
51740
|
});
|
|
51736
|
-
|
|
51741
|
+
tempStorage.setFontColor(item.itemType, fontColor);
|
|
51737
51742
|
}
|
|
51738
51743
|
this.emitApplied({
|
|
51739
51744
|
class: "RichText",
|
|
@@ -51777,7 +51782,7 @@ class BoardSelection {
|
|
|
51777
51782
|
ops
|
|
51778
51783
|
});
|
|
51779
51784
|
if (item.itemType !== "AINode") {
|
|
51780
|
-
|
|
51785
|
+
tempStorage.setFontHighlight(item.itemType, fontHighlight);
|
|
51781
51786
|
}
|
|
51782
51787
|
}
|
|
51783
51788
|
this.emitApplied({
|
|
@@ -51803,7 +51808,7 @@ class BoardSelection {
|
|
|
51803
51808
|
selection: text5.editor.getSelection(),
|
|
51804
51809
|
ops
|
|
51805
51810
|
});
|
|
51806
|
-
|
|
51811
|
+
tempStorage.setHorizontalAlignment(item.itemType, horisontalAlignment);
|
|
51807
51812
|
}
|
|
51808
51813
|
this.emitApplied({
|
|
51809
51814
|
class: "RichText",
|
|
@@ -51827,7 +51832,7 @@ class BoardSelection {
|
|
|
51827
51832
|
if (!text5) {
|
|
51828
51833
|
return;
|
|
51829
51834
|
}
|
|
51830
|
-
|
|
51835
|
+
tempStorage.setVerticalAlignment(item.itemType, verticalAlignment);
|
|
51831
51836
|
if (item instanceof RichText) {
|
|
51832
51837
|
item.setEditorFocus(this.context);
|
|
51833
51838
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -637,7 +637,7 @@ __export(exports_src, {
|
|
|
637
637
|
transformHtmlOrTextToMarkdown: () => transformHtmlOrTextToMarkdown,
|
|
638
638
|
toRelativePoint: () => toRelativePoint,
|
|
639
639
|
toFiniteNumber: () => toFiniteNumber,
|
|
640
|
-
tempStorage: () =>
|
|
640
|
+
tempStorage: () => tempStorage,
|
|
641
641
|
tagByType: () => tagByType,
|
|
642
642
|
stickerColors: () => stickerColors,
|
|
643
643
|
sha256: () => sha256,
|
|
@@ -708,7 +708,7 @@ __export(exports_src, {
|
|
|
708
708
|
Shapes: () => Shapes,
|
|
709
709
|
ShapeCommand: () => ShapeCommand,
|
|
710
710
|
Shape: () => Shape,
|
|
711
|
-
SessionStorage: () =>
|
|
711
|
+
SessionStorage: () => SessionStorage,
|
|
712
712
|
Selection: () => BoardSelection,
|
|
713
713
|
STEP_STROKE_WIDTH: () => STEP_STROKE_WIDTH,
|
|
714
714
|
SHAPE_LAST_TYPE_KEY: () => SHAPE_LAST_TYPE_KEY,
|
|
@@ -8609,7 +8609,7 @@ if (typeof window !== "undefined" && window.sessionStorage) {
|
|
|
8609
8609
|
_sessionStorage = new NodeStoragePolyfill;
|
|
8610
8610
|
}
|
|
8611
8611
|
|
|
8612
|
-
class
|
|
8612
|
+
class SessionStorage {
|
|
8613
8613
|
set(key, value) {
|
|
8614
8614
|
const boardId = this.getBoardId() || "";
|
|
8615
8615
|
_sessionStorage.setItem(boardId + "_" + key, JSON.stringify(value));
|
|
@@ -8741,7 +8741,7 @@ class SessionStorage2 {
|
|
|
8741
8741
|
return window.location.href.split("/").pop()?.split("?")[0];
|
|
8742
8742
|
}
|
|
8743
8743
|
}
|
|
8744
|
-
var
|
|
8744
|
+
var tempStorage = new SessionStorage;
|
|
8745
8745
|
|
|
8746
8746
|
// src/HTMLRender/HTMLRender.ts
|
|
8747
8747
|
function getTranslationFromHTML(el) {
|
|
@@ -18317,7 +18317,7 @@ class RichText extends Mbr {
|
|
|
18317
18317
|
counter = counter + 1;
|
|
18318
18318
|
this.rtCounter = counter;
|
|
18319
18319
|
this.linkTo = linkTo || new LinkTo(this.id, this.board.events);
|
|
18320
|
-
let textSizeFromStorage = new
|
|
18320
|
+
let textSizeFromStorage = new SessionStorage().getFontSize(insideOf || "RichText");
|
|
18321
18321
|
if (!textSizeFromStorage || textSizeFromStorage === "auto") {
|
|
18322
18322
|
textSizeFromStorage = initialTextStyles.fontSize;
|
|
18323
18323
|
}
|
|
@@ -37202,7 +37202,7 @@ class Shape extends BaseItem {
|
|
|
37202
37202
|
this.updateMbr();
|
|
37203
37203
|
}
|
|
37204
37204
|
saveShapeData() {
|
|
37205
|
-
|
|
37205
|
+
tempStorage.setShapeData({
|
|
37206
37206
|
shapeType: this.shapeType,
|
|
37207
37207
|
backgroundColor: this.backgroundColor,
|
|
37208
37208
|
backgroundOpacity: this.backgroundOpacity,
|
|
@@ -37743,7 +37743,7 @@ class Sticker extends BaseItem {
|
|
|
37743
37743
|
}
|
|
37744
37744
|
}
|
|
37745
37745
|
saveStickerData() {
|
|
37746
|
-
const storage = new
|
|
37746
|
+
const storage = new SessionStorage;
|
|
37747
37747
|
storage.setStickerData(this.serialize());
|
|
37748
37748
|
}
|
|
37749
37749
|
serialize() {
|
|
@@ -38256,8 +38256,8 @@ class Frame extends BaseItem {
|
|
|
38256
38256
|
this.borderWidth = borderWidth;
|
|
38257
38257
|
this.textContainer = Frames[this.shapeType].textBounds.copy();
|
|
38258
38258
|
this.path = Frames[this.shapeType].path.copy();
|
|
38259
|
-
this.transformation = new Transformation(this.id,
|
|
38260
|
-
this.linkTo = new LinkTo(this.id,
|
|
38259
|
+
this.transformation = new Transformation(this.id, board.events);
|
|
38260
|
+
this.linkTo = new LinkTo(this.id, board.events);
|
|
38261
38261
|
this.text = new RichText(board, this.textContainer, this.id, this.transformation, this.linkTo, this.name, true, false, "Frame", { ...conf.DEFAULT_TEXT_STYLES, fontColor: FRAME_TITLE_COLOR });
|
|
38262
38262
|
this.text.setSelectionHorisontalAlignment("left");
|
|
38263
38263
|
this.transformation.subject.subscribe(() => {
|
|
@@ -39168,7 +39168,7 @@ function calculatePosition(boardImage, board) {
|
|
|
39168
39168
|
const centerPoint = viewportMbr.getCenter();
|
|
39169
39169
|
const imageWidth = boardImage.getWidth();
|
|
39170
39170
|
const imageHeight = boardImage.getHeight();
|
|
39171
|
-
const prevDimensions =
|
|
39171
|
+
const prevDimensions = tempStorage.getImageDimensions();
|
|
39172
39172
|
if (prevDimensions) {
|
|
39173
39173
|
const scaleX2 = prevDimensions.width / imageWidth;
|
|
39174
39174
|
const scaleY2 = prevDimensions.height / imageHeight;
|
|
@@ -39189,7 +39189,7 @@ function calculatePosition(boardImage, board) {
|
|
|
39189
39189
|
const finalScale = scaleToFit;
|
|
39190
39190
|
const scaledImageWidth = imageWidth * finalScale;
|
|
39191
39191
|
const scaledImageHeight = imageHeight * finalScale;
|
|
39192
|
-
|
|
39192
|
+
tempStorage.setImageDimensions({
|
|
39193
39193
|
width: scaledImageWidth,
|
|
39194
39194
|
height: scaledImageHeight
|
|
39195
39195
|
});
|
|
@@ -42232,7 +42232,7 @@ class AddShape extends BoardTool {
|
|
|
42232
42232
|
constructor(board) {
|
|
42233
42233
|
super(board);
|
|
42234
42234
|
this.setCursor();
|
|
42235
|
-
const data =
|
|
42235
|
+
const data = tempStorage.getShapeData();
|
|
42236
42236
|
if (data) {
|
|
42237
42237
|
this.shape = new Shape(board, "", data.shapeType, data.backgroundColor, data.backgroundOpacity, data.borderColor, data.borderOpacity, data.borderStyle, data.borderWidth);
|
|
42238
42238
|
this.setShapeType(data.shapeType);
|
|
@@ -42313,13 +42313,13 @@ class AddShape extends BoardTool {
|
|
|
42313
42313
|
if (this.type === "None") {
|
|
42314
42314
|
return false;
|
|
42315
42315
|
}
|
|
42316
|
-
const width2 = this.bounds.getWidth() < 2 ?
|
|
42317
|
-
const height2 = this.bounds.getHeight() < 2 ?
|
|
42316
|
+
const width2 = this.bounds.getWidth() < 2 ? tempStorage.getShapeWidth() || 100 : this.bounds.getWidth();
|
|
42317
|
+
const height2 = this.bounds.getHeight() < 2 ? tempStorage.getShapeHeight() || 100 : this.bounds.getHeight();
|
|
42318
42318
|
if (this.bounds.getWidth() > 2) {
|
|
42319
|
-
|
|
42319
|
+
tempStorage.setShapeWidth(this.bounds.getWidth());
|
|
42320
42320
|
}
|
|
42321
42321
|
if (this.bounds.getHeight() > 2) {
|
|
42322
|
-
|
|
42322
|
+
tempStorage.setShapeHeight(this.bounds.getHeight());
|
|
42323
42323
|
}
|
|
42324
42324
|
this.initTransformation(width2 / 100, height2 / 100);
|
|
42325
42325
|
const shape = this.board.add(this.shape);
|
|
@@ -43507,7 +43507,7 @@ function getQuickAddButtons(selection, board) {
|
|
|
43507
43507
|
let htmlButtons = undefined;
|
|
43508
43508
|
let quickAddItems = undefined;
|
|
43509
43509
|
function calculateQuickAddPosition(index2, selectedItem, connectorStartPoint) {
|
|
43510
|
-
const connectorStorage = new
|
|
43510
|
+
const connectorStorage = new SessionStorage;
|
|
43511
43511
|
const currMbr = selectedItem.getMbr();
|
|
43512
43512
|
const selectedItemData = selectedItem.serialize();
|
|
43513
43513
|
const width2 = selectedItem.itemType === "Shape" ? selectedItem.getPath().getMbr().getWidth() : currMbr.getWidth();
|
|
@@ -43570,7 +43570,7 @@ function getQuickAddButtons(selection, board) {
|
|
|
43570
43570
|
const fontSize = selectedItem.itemType === "RichText" ? selectedItem.getFontSize() : 14;
|
|
43571
43571
|
const newItem = board.createItem(board.getNewItemId(), newItemData);
|
|
43572
43572
|
if (newItem.itemType === "RichText") {
|
|
43573
|
-
const storage = new
|
|
43573
|
+
const storage = new SessionStorage;
|
|
43574
43574
|
storage.setFontSize("RichText", fontSize);
|
|
43575
43575
|
newItem.editor.selectWholeText();
|
|
43576
43576
|
newItem.applySelectionFontSize(fontSize);
|
|
@@ -45117,6 +45117,11 @@ class StickerTool extends CustomTool {
|
|
|
45117
45117
|
}
|
|
45118
45118
|
}
|
|
45119
45119
|
|
|
45120
|
+
// src/api/isIfarme.ts
|
|
45121
|
+
var isIframe = () => {
|
|
45122
|
+
return window.self !== window.top;
|
|
45123
|
+
};
|
|
45124
|
+
|
|
45120
45125
|
// src/Tools/Tools.ts
|
|
45121
45126
|
var registeredTools = {};
|
|
45122
45127
|
|
|
@@ -48018,7 +48023,7 @@ class Presence {
|
|
|
48018
48023
|
if (!ctx) {
|
|
48019
48024
|
return;
|
|
48020
48025
|
}
|
|
48021
|
-
const anonTranslate = i18n.t("presence.anonymous");
|
|
48026
|
+
const anonTranslate = conf.i18n.t("presence.anonymous");
|
|
48022
48027
|
const label = cursor.nickname === "Anonymous" ? anonTranslate : cursor.nickname;
|
|
48023
48028
|
const textWidth = ctx.measureText(label).width;
|
|
48024
48029
|
const labelHeight = 20 * scale;
|
|
@@ -50360,7 +50365,7 @@ function transformItems({
|
|
|
50360
50365
|
return null;
|
|
50361
50366
|
}
|
|
50362
50367
|
if (single instanceof ImageItem) {
|
|
50363
|
-
|
|
50368
|
+
tempStorage.setImageDimensions({
|
|
50364
50369
|
width: resize.mbr.getWidth(),
|
|
50365
50370
|
height: resize.mbr.getHeight()
|
|
50366
50371
|
});
|
|
@@ -51119,12 +51124,12 @@ class BoardSelection {
|
|
|
51119
51124
|
return;
|
|
51120
51125
|
}
|
|
51121
51126
|
if (text5.isEmpty()) {
|
|
51122
|
-
const textColor =
|
|
51123
|
-
const textSize =
|
|
51124
|
-
const highlightColor =
|
|
51125
|
-
const styles =
|
|
51126
|
-
const horizontalAlignment =
|
|
51127
|
-
const verticalAlignment =
|
|
51127
|
+
const textColor = tempStorage.getFontColor(item.itemType);
|
|
51128
|
+
const textSize = tempStorage.getFontSize(item.itemType);
|
|
51129
|
+
const highlightColor = tempStorage.getFontHighlight(item.itemType);
|
|
51130
|
+
const styles = tempStorage.getFontStyles(item.itemType);
|
|
51131
|
+
const horizontalAlignment = tempStorage.getHorizontalAlignment(item.itemType);
|
|
51132
|
+
const verticalAlignment = tempStorage.getVerticalAlignment(item.itemType);
|
|
51128
51133
|
if (textColor) {
|
|
51129
51134
|
text5.setSelectionFontColor(textColor, "None");
|
|
51130
51135
|
}
|
|
@@ -51667,9 +51672,9 @@ class BoardSelection {
|
|
|
51667
51672
|
ops
|
|
51668
51673
|
});
|
|
51669
51674
|
if (item.itemType === "Sticker" && fontSize === "auto") {
|
|
51670
|
-
|
|
51675
|
+
tempStorage.remove(`fontSize_${item.itemType}`);
|
|
51671
51676
|
} else if (item.itemType !== "AINode") {
|
|
51672
|
-
|
|
51677
|
+
tempStorage.setFontSize(item.itemType, fontSize);
|
|
51673
51678
|
}
|
|
51674
51679
|
}
|
|
51675
51680
|
const emptyOps = itemsOps.filter((op) => !op.ops.length);
|
|
@@ -51707,7 +51712,7 @@ class BoardSelection {
|
|
|
51707
51712
|
ops
|
|
51708
51713
|
});
|
|
51709
51714
|
if (item.itemType !== "AINode") {
|
|
51710
|
-
|
|
51715
|
+
tempStorage.setFontStyles(item.itemType, text5.getFontStyles());
|
|
51711
51716
|
}
|
|
51712
51717
|
}
|
|
51713
51718
|
this.emitApplied({
|
|
@@ -51733,7 +51738,7 @@ class BoardSelection {
|
|
|
51733
51738
|
selection: text5.editor.getSelection(),
|
|
51734
51739
|
ops
|
|
51735
51740
|
});
|
|
51736
|
-
|
|
51741
|
+
tempStorage.setFontColor(item.itemType, fontColor);
|
|
51737
51742
|
}
|
|
51738
51743
|
this.emitApplied({
|
|
51739
51744
|
class: "RichText",
|
|
@@ -51777,7 +51782,7 @@ class BoardSelection {
|
|
|
51777
51782
|
ops
|
|
51778
51783
|
});
|
|
51779
51784
|
if (item.itemType !== "AINode") {
|
|
51780
|
-
|
|
51785
|
+
tempStorage.setFontHighlight(item.itemType, fontHighlight);
|
|
51781
51786
|
}
|
|
51782
51787
|
}
|
|
51783
51788
|
this.emitApplied({
|
|
@@ -51803,7 +51808,7 @@ class BoardSelection {
|
|
|
51803
51808
|
selection: text5.editor.getSelection(),
|
|
51804
51809
|
ops
|
|
51805
51810
|
});
|
|
51806
|
-
|
|
51811
|
+
tempStorage.setHorizontalAlignment(item.itemType, horisontalAlignment);
|
|
51807
51812
|
}
|
|
51808
51813
|
this.emitApplied({
|
|
51809
51814
|
class: "RichText",
|
|
@@ -51827,7 +51832,7 @@ class BoardSelection {
|
|
|
51827
51832
|
if (!text5) {
|
|
51828
51833
|
return;
|
|
51829
51834
|
}
|
|
51830
|
-
|
|
51835
|
+
tempStorage.setVerticalAlignment(item.itemType, verticalAlignment);
|
|
51831
51836
|
if (item instanceof RichText) {
|
|
51832
51837
|
item.setEditorFocus(this.context);
|
|
51833
51838
|
}
|