microboard-temp 0.12.6 → 0.12.7
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 +7 -4
- package/dist/cjs/index.js +7 -4
- package/dist/cjs/node.js +7 -4
- package/dist/esm/browser.js +7 -4
- package/dist/esm/index.js +7 -4
- package/dist/esm/node.js +7 -4
- package/package.json +1 -1
package/dist/cjs/browser.js
CHANGED
|
@@ -40473,7 +40473,7 @@ var stickerColors = {
|
|
|
40473
40473
|
var width = 200;
|
|
40474
40474
|
var height = 200;
|
|
40475
40475
|
var StickerShape = {
|
|
40476
|
-
textBounds: new Mbr(
|
|
40476
|
+
textBounds: new Mbr(8, 8, width - 8, height - 8),
|
|
40477
40477
|
stickerPath: new Path([
|
|
40478
40478
|
new Line(new Point(0, 0), new Point(width, 0)),
|
|
40479
40479
|
new Line(new Point(width, 0), new Point(width, height)),
|
|
@@ -40714,16 +40714,19 @@ class Sticker extends BaseItem {
|
|
|
40714
40714
|
div.style.boxShadow = "0px 18px 24px rgba(20, 21, 26, 0.25), 0px 8px 8px rgba(20, 21, 26, 0.125)";
|
|
40715
40715
|
const autoScale = this.text.isAutosize() && this.text.getAutoSizeScale() || 1;
|
|
40716
40716
|
const textElement = this.text.renderHTML(documentFactory);
|
|
40717
|
-
const padding =
|
|
40717
|
+
const padding = 8;
|
|
40718
40718
|
textElement.id = `${this.getId()}_text`;
|
|
40719
40719
|
textElement.style.overflow = "auto";
|
|
40720
40720
|
positionRelatively(textElement, div, padding);
|
|
40721
40721
|
resetElementScale(textElement);
|
|
40722
40722
|
scaleElementBy(textElement, 1 / scaleX, 1 / scaleY);
|
|
40723
40723
|
scaleElementBy(textElement, autoScale, autoScale);
|
|
40724
|
-
|
|
40724
|
+
const maxAvailableWidth = unscaledWidth - 2 * padding;
|
|
40725
|
+
textElement.style.maxWidth = `${maxAvailableWidth * scaleX}px`;
|
|
40725
40726
|
if (autoScale < 1) {
|
|
40726
|
-
textElement.style.width = `${
|
|
40727
|
+
textElement.style.width = `${maxAvailableWidth * scaleX}px`;
|
|
40728
|
+
} else {
|
|
40729
|
+
textElement.style.width = "100%";
|
|
40727
40730
|
}
|
|
40728
40731
|
const textHeight = this.text.layoutNodes.height * autoScale;
|
|
40729
40732
|
if (textHeight < height2) {
|
package/dist/cjs/index.js
CHANGED
|
@@ -40473,7 +40473,7 @@ var stickerColors = {
|
|
|
40473
40473
|
var width = 200;
|
|
40474
40474
|
var height = 200;
|
|
40475
40475
|
var StickerShape = {
|
|
40476
|
-
textBounds: new Mbr(
|
|
40476
|
+
textBounds: new Mbr(8, 8, width - 8, height - 8),
|
|
40477
40477
|
stickerPath: new Path([
|
|
40478
40478
|
new Line(new Point(0, 0), new Point(width, 0)),
|
|
40479
40479
|
new Line(new Point(width, 0), new Point(width, height)),
|
|
@@ -40714,16 +40714,19 @@ class Sticker extends BaseItem {
|
|
|
40714
40714
|
div.style.boxShadow = "0px 18px 24px rgba(20, 21, 26, 0.25), 0px 8px 8px rgba(20, 21, 26, 0.125)";
|
|
40715
40715
|
const autoScale = this.text.isAutosize() && this.text.getAutoSizeScale() || 1;
|
|
40716
40716
|
const textElement = this.text.renderHTML(documentFactory);
|
|
40717
|
-
const padding =
|
|
40717
|
+
const padding = 8;
|
|
40718
40718
|
textElement.id = `${this.getId()}_text`;
|
|
40719
40719
|
textElement.style.overflow = "auto";
|
|
40720
40720
|
positionRelatively(textElement, div, padding);
|
|
40721
40721
|
resetElementScale(textElement);
|
|
40722
40722
|
scaleElementBy(textElement, 1 / scaleX, 1 / scaleY);
|
|
40723
40723
|
scaleElementBy(textElement, autoScale, autoScale);
|
|
40724
|
-
|
|
40724
|
+
const maxAvailableWidth = unscaledWidth - 2 * padding;
|
|
40725
|
+
textElement.style.maxWidth = `${maxAvailableWidth * scaleX}px`;
|
|
40725
40726
|
if (autoScale < 1) {
|
|
40726
|
-
textElement.style.width = `${
|
|
40727
|
+
textElement.style.width = `${maxAvailableWidth * scaleX}px`;
|
|
40728
|
+
} else {
|
|
40729
|
+
textElement.style.width = "100%";
|
|
40727
40730
|
}
|
|
40728
40731
|
const textHeight = this.text.layoutNodes.height * autoScale;
|
|
40729
40732
|
if (textHeight < height2) {
|
package/dist/cjs/node.js
CHANGED
|
@@ -42946,7 +42946,7 @@ var stickerColors = {
|
|
|
42946
42946
|
var width = 200;
|
|
42947
42947
|
var height = 200;
|
|
42948
42948
|
var StickerShape = {
|
|
42949
|
-
textBounds: new Mbr(
|
|
42949
|
+
textBounds: new Mbr(8, 8, width - 8, height - 8),
|
|
42950
42950
|
stickerPath: new Path([
|
|
42951
42951
|
new Line(new Point(0, 0), new Point(width, 0)),
|
|
42952
42952
|
new Line(new Point(width, 0), new Point(width, height)),
|
|
@@ -43187,16 +43187,19 @@ class Sticker extends BaseItem {
|
|
|
43187
43187
|
div.style.boxShadow = "0px 18px 24px rgba(20, 21, 26, 0.25), 0px 8px 8px rgba(20, 21, 26, 0.125)";
|
|
43188
43188
|
const autoScale = this.text.isAutosize() && this.text.getAutoSizeScale() || 1;
|
|
43189
43189
|
const textElement = this.text.renderHTML(documentFactory);
|
|
43190
|
-
const padding =
|
|
43190
|
+
const padding = 8;
|
|
43191
43191
|
textElement.id = `${this.getId()}_text`;
|
|
43192
43192
|
textElement.style.overflow = "auto";
|
|
43193
43193
|
positionRelatively(textElement, div, padding);
|
|
43194
43194
|
resetElementScale(textElement);
|
|
43195
43195
|
scaleElementBy(textElement, 1 / scaleX, 1 / scaleY);
|
|
43196
43196
|
scaleElementBy(textElement, autoScale, autoScale);
|
|
43197
|
-
|
|
43197
|
+
const maxAvailableWidth = unscaledWidth - 2 * padding;
|
|
43198
|
+
textElement.style.maxWidth = `${maxAvailableWidth * scaleX}px`;
|
|
43198
43199
|
if (autoScale < 1) {
|
|
43199
|
-
textElement.style.width = `${
|
|
43200
|
+
textElement.style.width = `${maxAvailableWidth * scaleX}px`;
|
|
43201
|
+
} else {
|
|
43202
|
+
textElement.style.width = "100%";
|
|
43200
43203
|
}
|
|
43201
43204
|
const textHeight = this.text.layoutNodes.height * autoScale;
|
|
43202
43205
|
if (textHeight < height2) {
|
package/dist/esm/browser.js
CHANGED
|
@@ -40302,7 +40302,7 @@ var stickerColors = {
|
|
|
40302
40302
|
var width = 200;
|
|
40303
40303
|
var height = 200;
|
|
40304
40304
|
var StickerShape = {
|
|
40305
|
-
textBounds: new Mbr(
|
|
40305
|
+
textBounds: new Mbr(8, 8, width - 8, height - 8),
|
|
40306
40306
|
stickerPath: new Path([
|
|
40307
40307
|
new Line(new Point(0, 0), new Point(width, 0)),
|
|
40308
40308
|
new Line(new Point(width, 0), new Point(width, height)),
|
|
@@ -40543,16 +40543,19 @@ class Sticker extends BaseItem {
|
|
|
40543
40543
|
div.style.boxShadow = "0px 18px 24px rgba(20, 21, 26, 0.25), 0px 8px 8px rgba(20, 21, 26, 0.125)";
|
|
40544
40544
|
const autoScale = this.text.isAutosize() && this.text.getAutoSizeScale() || 1;
|
|
40545
40545
|
const textElement = this.text.renderHTML(documentFactory);
|
|
40546
|
-
const padding =
|
|
40546
|
+
const padding = 8;
|
|
40547
40547
|
textElement.id = `${this.getId()}_text`;
|
|
40548
40548
|
textElement.style.overflow = "auto";
|
|
40549
40549
|
positionRelatively(textElement, div, padding);
|
|
40550
40550
|
resetElementScale(textElement);
|
|
40551
40551
|
scaleElementBy(textElement, 1 / scaleX, 1 / scaleY);
|
|
40552
40552
|
scaleElementBy(textElement, autoScale, autoScale);
|
|
40553
|
-
|
|
40553
|
+
const maxAvailableWidth = unscaledWidth - 2 * padding;
|
|
40554
|
+
textElement.style.maxWidth = `${maxAvailableWidth * scaleX}px`;
|
|
40554
40555
|
if (autoScale < 1) {
|
|
40555
|
-
textElement.style.width = `${
|
|
40556
|
+
textElement.style.width = `${maxAvailableWidth * scaleX}px`;
|
|
40557
|
+
} else {
|
|
40558
|
+
textElement.style.width = "100%";
|
|
40556
40559
|
}
|
|
40557
40560
|
const textHeight = this.text.layoutNodes.height * autoScale;
|
|
40558
40561
|
if (textHeight < height2) {
|
package/dist/esm/index.js
CHANGED
|
@@ -40295,7 +40295,7 @@ var stickerColors = {
|
|
|
40295
40295
|
var width = 200;
|
|
40296
40296
|
var height = 200;
|
|
40297
40297
|
var StickerShape = {
|
|
40298
|
-
textBounds: new Mbr(
|
|
40298
|
+
textBounds: new Mbr(8, 8, width - 8, height - 8),
|
|
40299
40299
|
stickerPath: new Path([
|
|
40300
40300
|
new Line(new Point(0, 0), new Point(width, 0)),
|
|
40301
40301
|
new Line(new Point(width, 0), new Point(width, height)),
|
|
@@ -40536,16 +40536,19 @@ class Sticker extends BaseItem {
|
|
|
40536
40536
|
div.style.boxShadow = "0px 18px 24px rgba(20, 21, 26, 0.25), 0px 8px 8px rgba(20, 21, 26, 0.125)";
|
|
40537
40537
|
const autoScale = this.text.isAutosize() && this.text.getAutoSizeScale() || 1;
|
|
40538
40538
|
const textElement = this.text.renderHTML(documentFactory);
|
|
40539
|
-
const padding =
|
|
40539
|
+
const padding = 8;
|
|
40540
40540
|
textElement.id = `${this.getId()}_text`;
|
|
40541
40541
|
textElement.style.overflow = "auto";
|
|
40542
40542
|
positionRelatively(textElement, div, padding);
|
|
40543
40543
|
resetElementScale(textElement);
|
|
40544
40544
|
scaleElementBy(textElement, 1 / scaleX, 1 / scaleY);
|
|
40545
40545
|
scaleElementBy(textElement, autoScale, autoScale);
|
|
40546
|
-
|
|
40546
|
+
const maxAvailableWidth = unscaledWidth - 2 * padding;
|
|
40547
|
+
textElement.style.maxWidth = `${maxAvailableWidth * scaleX}px`;
|
|
40547
40548
|
if (autoScale < 1) {
|
|
40548
|
-
textElement.style.width = `${
|
|
40549
|
+
textElement.style.width = `${maxAvailableWidth * scaleX}px`;
|
|
40550
|
+
} else {
|
|
40551
|
+
textElement.style.width = "100%";
|
|
40549
40552
|
}
|
|
40550
40553
|
const textHeight = this.text.layoutNodes.height * autoScale;
|
|
40551
40554
|
if (textHeight < height2) {
|
package/dist/esm/node.js
CHANGED
|
@@ -42763,7 +42763,7 @@ var stickerColors = {
|
|
|
42763
42763
|
var width = 200;
|
|
42764
42764
|
var height = 200;
|
|
42765
42765
|
var StickerShape = {
|
|
42766
|
-
textBounds: new Mbr(
|
|
42766
|
+
textBounds: new Mbr(8, 8, width - 8, height - 8),
|
|
42767
42767
|
stickerPath: new Path([
|
|
42768
42768
|
new Line(new Point(0, 0), new Point(width, 0)),
|
|
42769
42769
|
new Line(new Point(width, 0), new Point(width, height)),
|
|
@@ -43004,16 +43004,19 @@ class Sticker extends BaseItem {
|
|
|
43004
43004
|
div.style.boxShadow = "0px 18px 24px rgba(20, 21, 26, 0.25), 0px 8px 8px rgba(20, 21, 26, 0.125)";
|
|
43005
43005
|
const autoScale = this.text.isAutosize() && this.text.getAutoSizeScale() || 1;
|
|
43006
43006
|
const textElement = this.text.renderHTML(documentFactory);
|
|
43007
|
-
const padding =
|
|
43007
|
+
const padding = 8;
|
|
43008
43008
|
textElement.id = `${this.getId()}_text`;
|
|
43009
43009
|
textElement.style.overflow = "auto";
|
|
43010
43010
|
positionRelatively(textElement, div, padding);
|
|
43011
43011
|
resetElementScale(textElement);
|
|
43012
43012
|
scaleElementBy(textElement, 1 / scaleX, 1 / scaleY);
|
|
43013
43013
|
scaleElementBy(textElement, autoScale, autoScale);
|
|
43014
|
-
|
|
43014
|
+
const maxAvailableWidth = unscaledWidth - 2 * padding;
|
|
43015
|
+
textElement.style.maxWidth = `${maxAvailableWidth * scaleX}px`;
|
|
43015
43016
|
if (autoScale < 1) {
|
|
43016
|
-
textElement.style.width = `${
|
|
43017
|
+
textElement.style.width = `${maxAvailableWidth * scaleX}px`;
|
|
43018
|
+
} else {
|
|
43019
|
+
textElement.style.width = "100%";
|
|
43017
43020
|
}
|
|
43018
43021
|
const textHeight = this.text.layoutNodes.height * autoScale;
|
|
43019
43022
|
if (textHeight < height2) {
|