kritzel-stencil 0.0.142 → 0.0.143
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/{index-SaGfCHX3.js → index-Cg50mv2K.js} +19 -8
- package/dist/cjs/index-Cg50mv2K.js.map +1 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/kritzel-color_22.cjs.entry.js +6 -6
- package/dist/collection/classes/core/viewport.class.js +1 -2
- package/dist/collection/classes/core/viewport.class.js.map +1 -1
- package/dist/collection/classes/objects/text.class.js +17 -3
- package/dist/collection/classes/objects/text.class.js.map +1 -1
- package/dist/collection/components/core/kritzel-engine/kritzel-engine.js +4 -4
- package/dist/collection/components/core/kritzel-engine/kritzel-engine.js.map +1 -1
- package/dist/collection/helpers/event.helper.js +0 -3
- package/dist/collection/helpers/event.helper.js.map +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/kritzel-controls.js +1 -1
- package/dist/components/kritzel-editor.js +3 -3
- package/dist/components/kritzel-engine.js +1 -1
- package/dist/components/{p-C8calcQF.js → p-BAw249L9.js} +3 -3
- package/dist/components/{p-C8calcQF.js.map → p-BAw249L9.js.map} +1 -1
- package/dist/components/{p-CZk591FE.js → p-CoFmi-t6.js} +19 -8
- package/dist/components/p-CoFmi-t6.js.map +1 -0
- package/dist/components/{p-CziwfEQh.js → p-EO13AYoE.js} +8 -8
- package/dist/components/p-EO13AYoE.js.map +1 -0
- package/dist/esm/{index-SIM_s7ed.js → index-Bj5QIJYQ.js} +20 -9
- package/dist/esm/index-Bj5QIJYQ.js.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/kritzel-color_22.entry.js +6 -6
- package/dist/stencil/index.esm.js +1 -1
- package/dist/stencil/{p-SIM_s7ed.js → p-Bj5QIJYQ.js} +2 -2
- package/dist/stencil/p-Bj5QIJYQ.js.map +1 -0
- package/dist/stencil/p-b4185842.entry.js +2 -0
- package/dist/stencil/p-b4185842.entry.js.map +1 -0
- package/dist/stencil/stencil.esm.js +1 -1
- package/dist/types/helpers/event.helper.d.ts +0 -1
- package/package.json +1 -1
- package/dist/cjs/index-SaGfCHX3.js.map +0 -1
- package/dist/components/p-CZk591FE.js.map +0 -1
- package/dist/components/p-CziwfEQh.js.map +0 -1
- package/dist/esm/index-SIM_s7ed.js.map +0 -1
- package/dist/stencil/p-SIM_s7ed.js.map +0 -1
- package/dist/stencil/p-b697b2c1.entry.js +0 -2
- package/dist/stencil/p-b697b2c1.entry.js.map +0 -1
|
@@ -14006,11 +14006,25 @@ class KritzelText extends KritzelBaseObject {
|
|
|
14006
14006
|
adjustSizeOnInput() {
|
|
14007
14007
|
const element = this.elementRef;
|
|
14008
14008
|
if (element && this.isMounted && element.scrollWidth > 0) {
|
|
14009
|
+
const previousTotalWidth = this.totalWidth;
|
|
14010
|
+
const previousTotalHeight = this.totalHeight;
|
|
14009
14011
|
const newWidth = element.scrollWidth;
|
|
14010
14012
|
const newHeight = element.scrollHeight;
|
|
14011
|
-
|
|
14012
|
-
|
|
14013
|
-
|
|
14013
|
+
this.width = newWidth * this.scaleFactor;
|
|
14014
|
+
this.height = newHeight * this.scaleFactor;
|
|
14015
|
+
if (this.rotation !== 0) {
|
|
14016
|
+
const newTotalWidth = this.totalWidth;
|
|
14017
|
+
const newTotalHeight = this.totalHeight;
|
|
14018
|
+
const deltaWidth = (newTotalWidth - previousTotalWidth) / 2;
|
|
14019
|
+
const deltaHeight = (newTotalHeight - previousTotalHeight) / 2;
|
|
14020
|
+
if (deltaWidth !== 0 || deltaHeight !== 0) {
|
|
14021
|
+
const cos = Math.cos(this.rotation);
|
|
14022
|
+
const sin = Math.sin(this.rotation);
|
|
14023
|
+
const rotatedDeltaX = cos * deltaWidth - sin * deltaHeight;
|
|
14024
|
+
const rotatedDeltaY = sin * deltaWidth + cos * deltaHeight;
|
|
14025
|
+
this.translateX += rotatedDeltaX - deltaWidth;
|
|
14026
|
+
this.translateY += rotatedDeltaY - deltaHeight;
|
|
14027
|
+
}
|
|
14014
14028
|
}
|
|
14015
14029
|
}
|
|
14016
14030
|
if (this._core) {
|
|
@@ -14489,9 +14503,6 @@ class KritzelEventHelper {
|
|
|
14489
14503
|
static isLeftClick(ev) {
|
|
14490
14504
|
return ev.button === exports.KritzelMouseButton.Left;
|
|
14491
14505
|
}
|
|
14492
|
-
static isMainMouseWheel(event) {
|
|
14493
|
-
return Math.abs(event.deltaY) > 0 && Math.abs(event.deltaX) === 0 && Number.isInteger(event.deltaY);
|
|
14494
|
-
}
|
|
14495
14506
|
static isPointerEventOnContextMenu(event) {
|
|
14496
14507
|
const path = event.composedPath();
|
|
14497
14508
|
const contextMenu = path.find(element => element.classList && element.classList.contains('context-menu'));
|
|
@@ -16447,6 +16458,6 @@ exports.ObjectHelper = ObjectHelper;
|
|
|
16447
16458
|
exports.RemoveObjectCommand = RemoveObjectCommand;
|
|
16448
16459
|
exports.RemoveSelectionGroupCommand = RemoveSelectionGroupCommand;
|
|
16449
16460
|
exports.UpdateObjectCommand = UpdateObjectCommand;
|
|
16450
|
-
//# sourceMappingURL=index-
|
|
16461
|
+
//# sourceMappingURL=index-Cg50mv2K.js.map
|
|
16451
16462
|
|
|
16452
|
-
//# sourceMappingURL=index-
|
|
16463
|
+
//# sourceMappingURL=index-Cg50mv2K.js.map
|