kritzel-stencil 0.1.9 → 0.1.11
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/{default-line-tool.config-C0aHyMAU.js → default-line-tool.config-DvzIh9zU.js} +2 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/kritzel-back-to-content_32.cjs.entry.js +79 -27
- package/dist/collection/classes/core/store.class.js +3 -0
- package/dist/collection/classes/core/viewport.class.js +0 -6
- package/dist/collection/classes/structures/object-map.structure.js +3 -0
- package/dist/collection/classes/structures/quadtree.structure.js +13 -1
- package/dist/collection/components/core/kritzel-editor/kritzel-editor.js +2 -1
- package/dist/collection/components/core/kritzel-engine/kritzel-engine.js +52 -15
- package/dist/collection/components/ui/kritzel-workspace-manager/kritzel-workspace-manager.js +4 -2
- package/dist/collection/constants/version.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/kritzel-controls.js +1 -1
- package/dist/components/kritzel-editor.js +1 -1
- package/dist/components/kritzel-engine.js +1 -1
- package/dist/components/kritzel-settings.js +1 -1
- package/dist/components/kritzel-tool-config.js +1 -1
- package/dist/components/kritzel-workspace-manager.js +1 -1
- package/dist/components/{p-CQV1Azq8.js → p-BvoIoyaZ.js} +1 -1
- package/dist/components/{p-dwP3Ewwh.js → p-COqRIjtS.js} +1 -1
- package/dist/components/p-CXGqvg3q.js +1 -0
- package/dist/components/{p-C30Sf5sI.js → p-Csm0Kf0_.js} +2 -2
- package/dist/components/{p-CVPA34Tp.js → p-CuifaWTr.js} +1 -1
- package/dist/components/{p-21gD4R2M.js → p-DuK31Tjt.js} +1 -1
- package/dist/esm/{default-line-tool.config-BNltY2Ek.js → default-line-tool.config-cZLDi3SD.js} +2 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/kritzel-back-to-content_32.entry.js +79 -27
- package/dist/stencil/index.esm.js +1 -1
- package/dist/stencil/{p-BNltY2Ek.js → p-cZLDi3SD.js} +1 -1
- package/dist/stencil/p-e975fd35.entry.js +9 -0
- package/dist/stencil/stencil.esm.js +1 -1
- package/dist/types/classes/core/store.class.d.ts +1 -0
- package/dist/types/classes/structures/object-map.structure.d.ts +1 -0
- package/dist/types/classes/structures/quadtree.structure.d.ts +4 -1
- package/dist/types/components/core/kritzel-engine/kritzel-engine.d.ts +0 -1
- package/dist/types/constants/version.d.ts +1 -1
- package/package.json +84 -84
- package/dist/components/p-ZkkRyYc_.js +0 -1
- package/dist/stencil/p-73be6ea9.entry.js +0 -9
package/dist/cjs/{default-line-tool.config-C0aHyMAU.js → default-line-tool.config-DvzIh9zU.js}
RENAMED
|
@@ -14300,7 +14300,8 @@ function requireCjs () {
|
|
|
14300
14300
|
if (hasRequiredCjs) return cjs;
|
|
14301
14301
|
hasRequiredCjs = 1;
|
|
14302
14302
|
(function (exports) {
|
|
14303
|
-
|
|
14303
|
+
Object.defineProperties(exports,{__esModule:{value:true},[Symbol.toStringTag]:{value:`Module`}});const{PI:e}=Math,t=e+1e-4,n=.5,r=[1,1];function i(e,t,n,r=e=>e){return e*r(.5-t*(.5-n))}const{min:a}=Math;function o(e,t,n){let r=a(1,t/n);return a(1,e+(a(1,1-r)-e)*(r*.275))}function s(e){return [-e[0],-e[1]]}function c(e,t){return [e[0]+t[0],e[1]+t[1]]}function l(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function u(e,t){return [e[0]-t[0],e[1]-t[1]]}function d(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function f(e,t){return [e[0]*t,e[1]*t]}function p(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function m(e,t){return [e[0]/t,e[1]/t]}function h(e){return [e[1],-e[0]]}function g(e,t){let n=t[0];return e[0]=t[1],e[1]=-n,e}function ee(e,t){return e[0]*t[0]+e[1]*t[1]}function _(e,t){return e[0]===t[0]&&e[1]===t[1]}function v(e){return Math.hypot(e[0],e[1])}function y(e,t){let n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function b(e){return m(e,v(e))}function x(e,t){return Math.hypot(e[1]-t[1],e[0]-t[0])}function S(e,t,n){let r=Math.sin(n),i=Math.cos(n),a=e[0]-t[0],o=e[1]-t[1],s=a*i-o*r,c=a*r+o*i;return [s+t[0],c+t[1]]}function C(e,t,n,r){let i=Math.sin(r),a=Math.cos(r),o=t[0]-n[0],s=t[1]-n[1],c=o*a-s*i,l=o*i+s*a;return e[0]=c+n[0],e[1]=l+n[1],e}function w(e,t,n){return c(e,f(u(t,e),n))}function te(e,t,n,r){let i=n[0]-t[0],a=n[1]-t[1];return e[0]=t[0]+i*r,e[1]=t[1]+a*r,e}function T(e,t,n){return c(e,f(t,n))}const E=[0,0],D=[0,0],O=[0,0];function k(e,n){let r=T(e,b(h(u(e,c(e,[1,1])))),-n),i=[],a=1/13;for(let n=a;n<=1;n+=a)i.push(S(r,e,t*2*n));return i}function A(e,n,r){let i=[],a=1/r;for(let r=a;r<=1;r+=a)i.push(S(n,e,t*r));return i}function j(e,t,n){let r=u(t,n),i=f(r,.5),a=f(r,.51);return [u(e,i),u(e,a),c(e,a),c(e,i)]}function M(e,n,r,i){let a=[],o=T(e,n,r),s=1/i;for(let n=s;n<1;n+=s)a.push(S(o,e,t*3*n));return a}function ne(e,t,n){return [c(e,f(t,n)),c(e,f(t,n*.99)),u(e,f(t,n*.99)),u(e,f(t,n))]}function N(e,t,n){return e===false||e===void 0?0:e===true?Math.max(t,n):e}function re(e,t,n){return e.slice(0,10).reduce((e,r)=>{let i=r.pressure;return t&&(i=o(e,r.distance,n)),(e+i)/2},e[0].pressure)}function P(e,n={}){let{size:r=16,smoothing:a=.5,thinning:f=.5,simulatePressure:m=true,easing:_=e=>e,start:v={},end:b={},last:x=false}=n,{cap:S=true,easing:w=e=>e*(2-e)}=v,{cap:T=true,easing:P=e=>--e*e*e+1}=b;if(e.length===0||r<=0)return [];let F=e[e.length-1].runningLength,I=N(v.taper,r,F),L=N(b.taper,r,F),R=(r*a)**2,z=[],B=[],V=re(e,m,r),H=i(r,f,e[e.length-1].pressure,_),U,W=e[0].vector,G=e[0].point,K=G,q=G,J=K,Y=false;for(let n=0;n<e.length;n++){let{pressure:a}=e[n],{point:s,vector:h,distance:v,runningLength:b}=e[n],x=n===e.length-1;if(!x&&F-b<3)continue;f?(m&&(a=o(V,v,r)),H=i(r,f,a,_)):H=r/2,U===void 0&&(U=H);let S=b<I?w(b/I):1,T=F-b<L?P((F-b)/L):1;H=Math.max(.01,H*Math.min(S,T));let k=(x?e[n]:e[n+1]).vector,A=x?1:ee(h,k),j=ee(h,W)<0&&!Y,M=A!==null&&A<0;if(j||M){g(E,W),p(E,E,H);for(let e=0;e<=1;e+=.07692307692307693)d(D,s,E),C(D,D,s,t*e),q=[D[0],D[1]],z.push(q),l(O,s,E),C(O,O,s,t*-e),J=[O[0],O[1]],B.push(J);G=q,K=J,M&&(Y=true);continue}if(Y=false,x){g(E,h),p(E,E,H),z.push(u(s,E)),B.push(c(s,E));continue}te(E,k,h,A),g(E,E),p(E,E,H),d(D,s,E),q=[D[0],D[1]],(n<=1||y(G,q)>R)&&(z.push(q),G=q),l(O,s,E),J=[O[0],O[1]],(n<=1||y(K,J)>R)&&(B.push(J),K=J),V=a,W=h;}let X=[e[0].point[0],e[0].point[1]],Z=e.length>1?[e[e.length-1].point[0],e[e.length-1].point[1]]:c(e[0].point,[1,1]),Q=[],$=[];if(e.length===1){if(!(I||L)||x)return k(X,U||H)}else {I||L&&e.length===1||(S?Q.push(...A(X,B[0],13)):Q.push(...j(X,z[0],B[0])));let t=h(s(e[e.length-1].vector));L||I&&e.length===1?$.push(Z):T?$.push(...M(Z,t,H,29)):$.push(...ne(Z,t,H));}return z.concat($,B.reverse(),Q)}const F=[0,0];function I(e){return e!=null&&e>=0}function L(e,t={}){let{streamline:i=.5,size:a=16,last:o=false}=t;if(e.length===0)return [];let s=.15+(1-i)*.85,l=Array.isArray(e[0])?e:e.map(({x:e,y:t,pressure:r=n})=>[e,t,r]);if(l.length===2){let e=l[1];l=l.slice(0,-1);for(let t=1;t<5;t++)l.push(w(l[0],e,t/4));}l.length===1&&(l=[...l,[...c(l[0],r),...l[0].slice(2)]]);let u=[{point:[l[0][0],l[0][1]],pressure:I(l[0][2])?l[0][2]:.25,vector:[...r],distance:0,runningLength:0}],f=false,p=0,m=u[0],h=l.length-1;for(let e=1;e<l.length;e++){let t=o&&e===h?[l[e][0],l[e][1]]:w(m.point,l[e],s);if(_(m.point,t))continue;let r=x(t,m.point);if(p+=r,e<h&&!f){if(p<a)continue;f=true;}d(F,m.point,t),m={point:t,pressure:I(l[e][2])?l[e][2]:n,vector:b(F),distance:r,runningLength:p},u.push(m);}return u[0].vector=u[1]?.vector||[0,0],u}function R(e,t={}){return P(L(e,t),t)}var z=R;exports.default=z,exports.getStroke=R,exports.getStrokeOutlinePoints=P,exports.getStrokePoints=L;
|
|
14304
|
+
|
|
14304
14305
|
} (cjs));
|
|
14305
14306
|
return cjs;
|
|
14306
14307
|
}
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-i21-qqbc.js');
|
|
4
|
-
var defaultLineTool_config = require('./default-line-tool.config-
|
|
4
|
+
var defaultLineTool_config = require('./default-line-tool.config-DvzIh9zU.js');
|
|
5
5
|
|
|
6
6
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
7
7
|
|
|
@@ -1710,6 +1710,7 @@ const KritzelEditor = class {
|
|
|
1710
1710
|
this.undoState = event.detail;
|
|
1711
1711
|
}
|
|
1712
1712
|
handleObjectsInViewportChange(event) {
|
|
1713
|
+
console.log(event.detail.length);
|
|
1713
1714
|
const hasVisibleObjects = event.detail.length > 0;
|
|
1714
1715
|
this.isBackToContentButtonVisible = !hasVisibleObjects;
|
|
1715
1716
|
}
|
|
@@ -1765,7 +1766,7 @@ const KritzelEditor = class {
|
|
|
1765
1766
|
}
|
|
1766
1767
|
}
|
|
1767
1768
|
render() {
|
|
1768
|
-
return (index.h(index.Host, { key: '
|
|
1769
|
+
return (index.h(index.Host, { key: '18113021f28ed340017ed15b3db83f275a1a45e0' }, index.h("div", { key: '75c4fc6fb48133edc3b9b2152c09d1b77dc3efc6', class: "top-left-buttons" }, index.h("kritzel-workspace-manager", { key: 'c6a68abaf70ebcf37af1870b832c9a2bd2c984fb', workspaces: this.workspaces, activeWorkspace: this.activeWorkspace, onWorkspaceChange: event => (this.activeWorkspace = event.detail), onIsWorkspaceManagerReady: () => (this.isWorkspaceManagerReady = true) }), index.h("kritzel-back-to-content", { key: 'e2be6fadb0a44dd6cc7a061767bc25b11dde5bf3', visible: this.isBackToContentButtonVisible, onBackToContent: () => this.backToContent() })), index.h("kritzel-engine", { key: '16c19e74e9a3bd61845fa3542a5a84a12a3c8a05', ref: el => (this.engineRef = el), workspace: this.activeWorkspace, syncConfig: this.syncConfig, scaleMax: this.scaleMax, lockDrawingScale: this.lockDrawingScale, scaleMin: this.scaleMin, globalContextMenuItems: this.globalContextMenuItems, objectContextMenuItems: this.objectContextMenuItems, onIsEngineReady: event => this.onEngineReady(event), onWorkspacesChange: event => this.handleWorkspacesChange(event), onObjectsChange: event => this.handleObjectsChange(event), onUndoStateChange: event => this.handleUndoStateChange(event), onObjectsInViewportChange: event => this.handleObjectsInViewportChange(event) }), index.h("kritzel-controls", { key: 'bb328c89b4ebbcce215e6ddf710126e7a71b5d30', class: { 'keyboard-open': this.isVirtualKeyboardOpen }, style: { display: this.isControlsVisible ? 'flex' : 'none' }, ref: el => (this.controlsRef = el), controls: this.controls, isUtilityPanelVisible: this.isUtilityPanelVisible, undoState: this.undoState, onIsControlsReady: () => (this.isControlsReady = true) }), index.h("div", { key: 'e7fd78379d8acc4715605c267aa352430633f6ac', class: "top-right-buttons" }, index.h("kritzel-settings", { key: '13db94ca32cabfbd2d6664c58f55e30fcbf99221', ref: el => (this.settingsRef = el), onSettingsChange: event => this.handleSettingsChange(event) }), index.h("kritzel-export", { key: 'a7aa9b6ada8b0d47edf418c392d6d04598d36925', ref: el => (this.exportRef = el), onExportPng: () => this.engineRef.exportViewportAsPng(), onExportSvg: () => this.engineRef.exportViewportAsSvg() }), index.h("kritzel-more-menu", { key: '70a1a954f678e6b634d5965b23f570f79824af43', onItemSelect: event => this.handleMoreMenuItemSelect(event) }))));
|
|
1769
1770
|
}
|
|
1770
1771
|
static get watchers() { return {
|
|
1771
1772
|
"isEngineReady": [{
|
|
@@ -19128,7 +19129,6 @@ class KritzelViewport {
|
|
|
19128
19129
|
this._core.store.state.skipContextMenu = true;
|
|
19129
19130
|
this._core.rerender();
|
|
19130
19131
|
this._debounceUpdate();
|
|
19131
|
-
this._core.engine.emitObjectsInViewportChange();
|
|
19132
19132
|
}
|
|
19133
19133
|
}
|
|
19134
19134
|
if (event.pointerType === 'touch') {
|
|
@@ -19165,7 +19165,6 @@ class KritzelViewport {
|
|
|
19165
19165
|
this._core.store.state.hasViewportChanged = true;
|
|
19166
19166
|
this._core.rerender();
|
|
19167
19167
|
this._debounceUpdate();
|
|
19168
|
-
this._core.engine.emitObjectsInViewportChange();
|
|
19169
19168
|
}
|
|
19170
19169
|
}
|
|
19171
19170
|
}
|
|
@@ -19202,7 +19201,6 @@ class KritzelViewport {
|
|
|
19202
19201
|
this._core.store.state.hasViewportChanged = true;
|
|
19203
19202
|
this._core.rerender();
|
|
19204
19203
|
this._debounceUpdate();
|
|
19205
|
-
this._core.engine.emitObjectsInViewportChange();
|
|
19206
19204
|
}
|
|
19207
19205
|
centerFitInViewport(object) {
|
|
19208
19206
|
const scaleX = this._core.store.state.viewportWidth / (object.rotatedBoundingBox.width * 1.1);
|
|
@@ -19232,7 +19230,6 @@ class KritzelViewport {
|
|
|
19232
19230
|
this._core.rerender();
|
|
19233
19231
|
this._debounceUpdate();
|
|
19234
19232
|
this._debounceEndScaling();
|
|
19235
|
-
this._core.engine.emitObjectsInViewportChange();
|
|
19236
19233
|
}
|
|
19237
19234
|
handlePan(event) {
|
|
19238
19235
|
const panSpeed = 0.8;
|
|
@@ -19241,7 +19238,6 @@ class KritzelViewport {
|
|
|
19241
19238
|
this._core.store.state.hasViewportChanged = true;
|
|
19242
19239
|
this._core.rerender();
|
|
19243
19240
|
this._debounceUpdate();
|
|
19244
|
-
this._core.engine.emitObjectsInViewportChange();
|
|
19245
19241
|
}
|
|
19246
19242
|
/**
|
|
19247
19243
|
* Cancels any ongoing viewport animation.
|
|
@@ -19283,7 +19279,6 @@ class KritzelViewport {
|
|
|
19283
19279
|
else {
|
|
19284
19280
|
this._animationFrameId = null;
|
|
19285
19281
|
this._debounceUpdate();
|
|
19286
|
-
this._core.engine.emitObjectsInViewportChange();
|
|
19287
19282
|
}
|
|
19288
19283
|
};
|
|
19289
19284
|
this._animationFrameId = requestAnimationFrame(animate);
|
|
@@ -19674,6 +19669,11 @@ class KritzelQuadtree {
|
|
|
19674
19669
|
capacity;
|
|
19675
19670
|
objects = [];
|
|
19676
19671
|
children = null;
|
|
19672
|
+
_size = 0;
|
|
19673
|
+
/** Total number of objects in the quadtree (O(1) access) */
|
|
19674
|
+
get size() {
|
|
19675
|
+
return this._size;
|
|
19676
|
+
}
|
|
19677
19677
|
constructor(bounds, capacity = 16) {
|
|
19678
19678
|
this.bounds = bounds;
|
|
19679
19679
|
this.capacity = capacity;
|
|
@@ -19681,6 +19681,7 @@ class KritzelQuadtree {
|
|
|
19681
19681
|
reset() {
|
|
19682
19682
|
this.objects = [];
|
|
19683
19683
|
this.children = null;
|
|
19684
|
+
this._size = 0;
|
|
19684
19685
|
}
|
|
19685
19686
|
insert(object) {
|
|
19686
19687
|
if (!this.intersects(object.rotatedBoundingBox, this.bounds)) {
|
|
@@ -19688,6 +19689,7 @@ class KritzelQuadtree {
|
|
|
19688
19689
|
}
|
|
19689
19690
|
if (this.objects.length < this.capacity && this.children === null) {
|
|
19690
19691
|
this.objects.push(object);
|
|
19692
|
+
this._size++;
|
|
19691
19693
|
return true;
|
|
19692
19694
|
}
|
|
19693
19695
|
if (this.children === null) {
|
|
@@ -19695,6 +19697,7 @@ class KritzelQuadtree {
|
|
|
19695
19697
|
}
|
|
19696
19698
|
for (const child of this.children) {
|
|
19697
19699
|
if (child.insert(object)) {
|
|
19700
|
+
this._size++;
|
|
19698
19701
|
return true;
|
|
19699
19702
|
}
|
|
19700
19703
|
}
|
|
@@ -19716,15 +19719,19 @@ class KritzelQuadtree {
|
|
|
19716
19719
|
return false;
|
|
19717
19720
|
}
|
|
19718
19721
|
remove(predicate) {
|
|
19722
|
+
let removed = 0;
|
|
19719
19723
|
const index = this.objects.findIndex(o => predicate(o));
|
|
19720
19724
|
if (index !== -1) {
|
|
19721
19725
|
this.objects.splice(index, 1);
|
|
19726
|
+
removed++;
|
|
19722
19727
|
}
|
|
19723
19728
|
if (this.children !== null) {
|
|
19724
19729
|
for (const child of this.children) {
|
|
19725
|
-
child.remove(predicate);
|
|
19730
|
+
removed += child.remove(predicate);
|
|
19726
19731
|
}
|
|
19727
19732
|
}
|
|
19733
|
+
this._size -= removed;
|
|
19734
|
+
return removed;
|
|
19728
19735
|
}
|
|
19729
19736
|
query(range) {
|
|
19730
19737
|
const results = [];
|
|
@@ -19810,6 +19817,9 @@ class KritzelObjectMap {
|
|
|
19810
19817
|
redoStackSize: this._undoManager ? this._undoManager.redoStack.length : 0,
|
|
19811
19818
|
};
|
|
19812
19819
|
}
|
|
19820
|
+
get totalCount() {
|
|
19821
|
+
return this.quadtree.size;
|
|
19822
|
+
}
|
|
19813
19823
|
constructor() {
|
|
19814
19824
|
this.quadtree = new KritzelQuadtree({
|
|
19815
19825
|
x: -Infinity,
|
|
@@ -20106,6 +20116,9 @@ class KritzelStore {
|
|
|
20106
20116
|
get currentZIndex() {
|
|
20107
20117
|
return Math.max(0, ...this._state.objects.filter(o => !(o instanceof defaultLineTool_config.KritzelSelectionGroup) && !(o instanceof defaultLineTool_config.KritzelSelectionBox)).map(o => o.zIndex)) + 1;
|
|
20108
20118
|
}
|
|
20119
|
+
get totalObjectCount() {
|
|
20120
|
+
return this._state.objects.totalCount;
|
|
20121
|
+
}
|
|
20109
20122
|
get allObjects() {
|
|
20110
20123
|
return this._state.objects.allObjects();
|
|
20111
20124
|
}
|
|
@@ -22192,6 +22205,17 @@ const KritzelEngine = class {
|
|
|
22192
22205
|
async getScreenshot(format = 'png') {
|
|
22193
22206
|
if (!this.host)
|
|
22194
22207
|
return null;
|
|
22208
|
+
// Save critical state before screenshot to restore after
|
|
22209
|
+
const savedState = {
|
|
22210
|
+
objects: this.core.store.state.objects,
|
|
22211
|
+
activeWorkspace: this.core.store.state.activeWorkspace,
|
|
22212
|
+
workspaces: this.core.store.state.workspaces,
|
|
22213
|
+
activeTool: this.core.store.state.activeTool,
|
|
22214
|
+
isReady: this.core.store.state.isReady,
|
|
22215
|
+
translateX: this.core.store.state.translateX,
|
|
22216
|
+
translateY: this.core.store.state.translateY,
|
|
22217
|
+
scale: this.core.store.state.scale,
|
|
22218
|
+
};
|
|
22195
22219
|
const options = {
|
|
22196
22220
|
filter: (node) => {
|
|
22197
22221
|
// Exclude the context menu and debug panel from the screenshot
|
|
@@ -22204,12 +22228,28 @@ const KritzelEngine = class {
|
|
|
22204
22228
|
return true;
|
|
22205
22229
|
},
|
|
22206
22230
|
};
|
|
22207
|
-
|
|
22208
|
-
|
|
22231
|
+
let result;
|
|
22232
|
+
try {
|
|
22233
|
+
if (format === 'svg') {
|
|
22234
|
+
result = await toSvg(this.host, options);
|
|
22235
|
+
}
|
|
22236
|
+
else {
|
|
22237
|
+
result = await toPng(this.host, options);
|
|
22238
|
+
}
|
|
22209
22239
|
}
|
|
22210
|
-
|
|
22211
|
-
|
|
22240
|
+
finally {
|
|
22241
|
+
// Restore state after screenshot in case cloning caused any side effects
|
|
22242
|
+
this.core.store.state.objects = savedState.objects;
|
|
22243
|
+
this.core.store.state.activeWorkspace = savedState.activeWorkspace;
|
|
22244
|
+
this.core.store.state.workspaces = savedState.workspaces;
|
|
22245
|
+
this.core.store.state.activeTool = savedState.activeTool;
|
|
22246
|
+
this.core.store.state.isReady = savedState.isReady;
|
|
22247
|
+
this.core.store.state.translateX = savedState.translateX;
|
|
22248
|
+
this.core.store.state.translateY = savedState.translateY;
|
|
22249
|
+
this.core.store.state.scale = savedState.scale;
|
|
22250
|
+
this.core.rerender();
|
|
22212
22251
|
}
|
|
22252
|
+
return result;
|
|
22213
22253
|
}
|
|
22214
22254
|
async exportViewportAsPng() {
|
|
22215
22255
|
try {
|
|
@@ -22331,10 +22371,6 @@ const KritzelEngine = class {
|
|
|
22331
22371
|
this.objectsSelectionChange.emit();
|
|
22332
22372
|
}
|
|
22333
22373
|
}
|
|
22334
|
-
emitObjectsInViewportChange() {
|
|
22335
|
-
const objects = this.core.store.objectsInViewport;
|
|
22336
|
-
this.objectsInViewportChange.emit(objects);
|
|
22337
|
-
}
|
|
22338
22374
|
_registerStateChangeListeners() {
|
|
22339
22375
|
this.core.store.onStateChange('activeTool', this._handleActiveToolChange.bind(this));
|
|
22340
22376
|
}
|
|
@@ -22369,7 +22405,10 @@ const KritzelEngine = class {
|
|
|
22369
22405
|
};
|
|
22370
22406
|
const visibleObjects = this.core.store.state.objects.query(viewportBounds).sort((a, b) => a.zIndex - b.zIndex);
|
|
22371
22407
|
this.core.cursorManager.applyCursor();
|
|
22372
|
-
|
|
22408
|
+
if (this.core.store.totalObjectCount > 0) {
|
|
22409
|
+
this.objectsInViewportChange.emit(visibleObjects);
|
|
22410
|
+
}
|
|
22411
|
+
return (index.h(index.Host, { key: '39f0ffff986b61133ad44f5eadab07f7d776cb01' }, this.core.store.state.debugInfo.showViewportInfo && (index.h("div", { key: '946bfcc8d6fb9986c1b7b7fc150eb7dfc45cbb59', class: "debug-panel" }, index.h("div", { key: 'ae6f054b4aefca557228d810125dec1b7695654c' }, "ActiveWorkspaceId: ", this.core.store.state?.activeWorkspace?.id), index.h("div", { key: 'f47b71175c0dd1db6fb1a82bbdfd5532a1ce55b3' }, "ActiveWorkspaceName: ", this.core.store.state?.activeWorkspace?.name), index.h("div", { key: 'aba67c4bd24fb9b03848614831d48e6d70ec104f' }, "TranslateX: ", this.core.store.state?.translateX), index.h("div", { key: 'f1c32b14966542f41a9118e3af76bd3f54ae0039' }, "TranslateY: ", this.core.store.state?.translateY), index.h("div", { key: '9d4457d49b8a2f5420fb115d41e9aeef2f72eb59' }, "ViewportWidth: ", this.core.store.state?.viewportWidth), index.h("div", { key: '53b482102ec828758904dcc4c8d62e8e960f87f0' }, "ViewportHeight: ", this.core.store.state?.viewportHeight), index.h("div", { key: '8f3a6156b882350b3ead9c5778df5c7c80ca8888' }, "PointerCount: ", this.core.store.state.pointers.size), index.h("div", { key: '6471128d6613f638848ea99e2337126828c6236a' }, "Scale: ", this.core.store.state?.scale), index.h("div", { key: 'f70133c73206ae0651a7777a87ecbfc967f97e0d' }, "ActiveTool: ", this.core.store.state?.activeTool?.name), index.h("div", { key: '172b5725dbb9b37a1b63df04e908906d5b04445d' }, "HasViewportChanged: ", this.core.store.state?.hasViewportChanged ? 'true' : 'false'), index.h("div", { key: '114e8afde10ea3e8eae32a2772914b56a0c718f4' }, "IsEnabled: ", this.core.store.state?.isEnabled ? 'true' : 'false'), index.h("div", { key: '9e8288cdf8d9f365317649fd36fd32f41d18a165' }, "IsScaling: ", this.core.store.state?.isScaling ? 'true' : 'false'), index.h("div", { key: '2498b02ef54fdb9752ca2c86ccb6a24ef272ee03' }, "IsPanning: ", this.core.store.state?.isPanning ? 'true' : 'false'), index.h("div", { key: '66b10615c0c15b2d1f93e22954bae32a171cda26' }, "IsSelecting: ", this.isSelecting ? 'true' : 'false'), index.h("div", { key: '8a246ad747b8b289e89d7edd8df84b74d88363de' }, "IsSelectionActive: ", this.isSelectionActive ? 'true' : 'false'), index.h("div", { key: '5d8086caabac9183f9be9076fa724d5d6b009b2a' }, "IsResizeHandleSelected: ", this.core.store.state.isResizeHandleSelected ? 'true' : 'false'), index.h("div", { key: 'edf7cbb6439ec09b26e895b696e80981a127ec8f' }, "IsRotationHandleSelected: ", this.core.store.state.isRotationHandleSelected ? 'true' : 'false'), index.h("div", { key: 'ad95478b84f7381fb32eb23606e5697e944649c2' }, "IsRotationHandleHovered: ", this.core.store.state.isRotationHandleHovered ? 'true' : 'false'), index.h("div", { key: 'ec41d473e9194732c6846ea388c24b4e2edd6119' }, "IsDrawing: ", this.core.store.state.isDrawing ? 'true' : 'false'), index.h("div", { key: 'dbe271f716901a41c857724abbf0837b63995e07' }, "IsWriting: ", this.core.store.state.isWriting ? 'true' : 'false'), index.h("div", { key: 'e8d6bac1c6069923cfd3f5d6177b60d6d3ad6eaa' }, "IsPointerDown: ", this.core.store.isPointerDown ? 'true' : 'false'), index.h("div", { key: 'a2b19dff95c8e35f7b40f9e378e8ca49e878d939' }, "PointerX: ", this.core.store.state?.pointerX), index.h("div", { key: 'f94f38ae42e2c98df3a82f09e18fa482f5c1a415' }, "PointerY: ", this.core.store.state?.pointerY), index.h("div", { key: '1bfc6689f25c7912074f147394ea1d9fce42d990' }, "SelectedObjects: ", this.core.store.selectionGroup?.objects.length || 0), index.h("div", { key: 'a7761da6ae5caa3f0df089b223006959ffec65fd' }, "ViewportCenter: (", viewportCenterX.toFixed(2), ", ", viewportCenterY.toFixed(2), ")"))), index.h("div", { key: '485aa0df270cc27992abfac5f7639967aa6845a3', id: "origin", class: "origin", style: {
|
|
22373
22412
|
transform: `matrix(${this.core.store.state?.scale}, 0, 0, ${this.core.store.state?.scale}, ${this.core.store.state?.translateX}, ${this.core.store.state?.translateY})`,
|
|
22374
22413
|
} }, visibleObjects?.map(object => {
|
|
22375
22414
|
return (index.h("div", { key: object.id, style: {
|
|
@@ -22397,7 +22436,9 @@ const KritzelEngine = class {
|
|
|
22397
22436
|
borderStyle: 'solid',
|
|
22398
22437
|
padding: object.padding + 'px',
|
|
22399
22438
|
overflow: 'visible',
|
|
22400
|
-
display: defaultLineTool_config.KritzelClassHelper.isInstanceOf(object, 'KritzelLine') || defaultLineTool_config.KritzelClassHelper.isInstanceOf(object, 'KritzelPath')
|
|
22439
|
+
display: defaultLineTool_config.KritzelClassHelper.isInstanceOf(object, 'KritzelLine') || defaultLineTool_config.KritzelClassHelper.isInstanceOf(object, 'KritzelPath')
|
|
22440
|
+
? 'none'
|
|
22441
|
+
: 'block',
|
|
22401
22442
|
} }, defaultLineTool_config.KritzelClassHelper.isInstanceOf(object, 'KritzelImage') && (index.h("img", { ref: el => object.mount(el), src: object.src, style: {
|
|
22402
22443
|
width: '100%',
|
|
22403
22444
|
height: '100%',
|
|
@@ -22533,10 +22574,18 @@ const KritzelEngine = class {
|
|
|
22533
22574
|
} }), index.h("circle", { class: "selection-line-handle-overlay start", cx: object.startX - object.x, cy: object.startY - object.y, r: `${(baseHandleTouchSize * object.scale) / this.core.store.state?.scale}`, style: {
|
|
22534
22575
|
fill: 'transparent',
|
|
22535
22576
|
paintOrder: 'fill',
|
|
22536
|
-
} }), index.h("circle", { class: "selection-line-handle center", cx: object.controlX !== undefined
|
|
22577
|
+
} }), index.h("circle", { class: "selection-line-handle center", cx: object.controlX !== undefined
|
|
22578
|
+
? (object.startX + 2 * object.controlX + object.endX) / 4 - object.x
|
|
22579
|
+
: (object.startX - object.x + object.endX - object.x) / 2, cy: object.controlY !== undefined
|
|
22580
|
+
? (object.startY + 2 * object.controlY + object.endY) / 4 - object.y
|
|
22581
|
+
: (object.startY - object.y + object.endY - object.y) / 2, r: `${(baseHandleSize * object.scale) / this.core.store.state?.scale}`, style: {
|
|
22537
22582
|
fill: 'var(--kritzel-selection-handle-color, #000000)',
|
|
22538
22583
|
paintOrder: 'fill',
|
|
22539
|
-
} }), index.h("circle", { class: "selection-line-handle-overlay center", cx: object.controlX !== undefined
|
|
22584
|
+
} }), index.h("circle", { class: "selection-line-handle-overlay center", cx: object.controlX !== undefined
|
|
22585
|
+
? (object.startX + 2 * object.controlX + object.endX) / 4 - object.x
|
|
22586
|
+
: (object.startX - object.x + object.endX - object.x) / 2, cy: object.controlY !== undefined
|
|
22587
|
+
? (object.startY + 2 * object.controlY + object.endY) / 4 - object.y
|
|
22588
|
+
: (object.startY - object.y + object.endY - object.y) / 2, r: `${(baseHandleTouchSize * object.scale) / this.core.store.state?.scale}`, style: {
|
|
22540
22589
|
fill: 'transparent',
|
|
22541
22590
|
paintOrder: 'fill',
|
|
22542
22591
|
} }), index.h("circle", { class: "selection-line-handle end", cx: object.endX - object.x, cy: object.endY - object.y, r: `${(baseHandleSize * object.scale) / this.core.store.state?.scale}`, style: {
|
|
@@ -22608,7 +22657,8 @@ const KritzelEngine = class {
|
|
|
22608
22657
|
strokeWidth: data.lineStrokeWidth,
|
|
22609
22658
|
strokeDasharray: data.dashArray,
|
|
22610
22659
|
strokeLinecap: 'round',
|
|
22611
|
-
} })) : (data.edgeX !== undefined &&
|
|
22660
|
+
} })) : (data.edgeX !== undefined &&
|
|
22661
|
+
data.edgeY !== undefined && (index.h("line", { x1: data.edgeX, y1: data.edgeY, x2: data.centerX, y2: data.centerY, style: {
|
|
22612
22662
|
stroke: 'var(--kritzel-snap-line-stroke, rgba(0, 0, 0, 0.2))',
|
|
22613
22663
|
strokeWidth: data.lineStrokeWidth,
|
|
22614
22664
|
strokeDasharray: data.dashArray,
|
|
@@ -22618,7 +22668,7 @@ const KritzelEngine = class {
|
|
|
22618
22668
|
stroke: 'var(--kritzel-snap-indicator-stroke, #007bff)',
|
|
22619
22669
|
strokeWidth: data.indicatorStrokeWidth,
|
|
22620
22670
|
} }))));
|
|
22621
|
-
})()), this.core.store.state.isContextMenuVisible && (index.h("kritzel-context-menu", { key: '
|
|
22671
|
+
})()), this.core.store.state.isContextMenuVisible && (index.h("kritzel-context-menu", { key: 'a46409b1a9d2c7a97e2463ac689e4fa1b0802a70', class: "context-menu", ref: el => (this.contextMenuElement = el), items: this.core.store.state.contextMenuItems, objects: this.core.store.selectionGroup?.objects || [], style: {
|
|
22622
22672
|
position: 'fixed',
|
|
22623
22673
|
left: `${this.core.store.state.contextMenuX}px`,
|
|
22624
22674
|
top: `${this.core.store.state.contextMenuY}px`,
|
|
@@ -22629,7 +22679,7 @@ const KritzelEngine = class {
|
|
|
22629
22679
|
y: (-this.core.store.state.translateY + this.core.store.state.contextMenuY) / this.core.store.state.scale,
|
|
22630
22680
|
}, this.core.store.selectionGroup?.objects);
|
|
22631
22681
|
this.hideContextMenu();
|
|
22632
|
-
}, onClose: () => this.hideContextMenu() })), this.core.store.state?.activeTool instanceof defaultLineTool_config.KritzelEraserTool && !this.core.store.state.isScaling && index.h("kritzel-cursor-trail", { key: '
|
|
22682
|
+
}, onClose: () => this.hideContextMenu() })), this.core.store.state?.activeTool instanceof defaultLineTool_config.KritzelEraserTool && !this.core.store.state.isScaling && index.h("kritzel-cursor-trail", { key: '479b86bb97be00f0859a62b2b16f419dff6d2bac', core: this.core })));
|
|
22633
22683
|
}
|
|
22634
22684
|
static get watchers() { return {
|
|
22635
22685
|
"workspace": [{
|
|
@@ -23599,7 +23649,7 @@ const KritzelPortal = class {
|
|
|
23599
23649
|
* This file is auto-generated by the version bump scripts.
|
|
23600
23650
|
* Do not modify manually.
|
|
23601
23651
|
*/
|
|
23602
|
-
const KRITZEL_VERSION = '0.1.
|
|
23652
|
+
const KRITZEL_VERSION = '0.1.11';
|
|
23603
23653
|
|
|
23604
23654
|
const kritzelSettingsCss = () => `:host{display:contents}kritzel-dialog{--kritzel-dialog-body-padding:0;--kritzel-dialog-width-large:800px;--kritzel-dialog-height-large:500px}.footer-button{padding:8px 16px;border-radius:6px;cursor:pointer;font-size:14px}.cancel-button{border:1px solid #ebebeb;background:#fff;color:inherit}.cancel-button:hover{background:#f5f5f5}.settings-content{padding:0}.settings-content h3{margin:0 0 16px 0;font-size:18px;font-weight:600;color:var(--kritzel-settings-content-heading-color, #333333)}.settings-content p{margin:0;font-size:14px;color:var(--kritzel-settings-content-text-color, #666666);line-height:1.5}.settings-group{display:flex;flex-direction:column;gap:24px}.settings-item{display:flex;flex-direction:column;gap:8px}.settings-row{display:flex;align-items:center;justify-content:space-between;gap:16px}.settings-label{font-size:14px;font-weight:500;color:var(--kritzel-settings-label-color, #333333);margin:0}.settings-description{font-size:12px;color:var(--kritzel-settings-description-color, #888888);margin:0;line-height:1.4}`;
|
|
23605
23655
|
|
|
@@ -24216,9 +24266,11 @@ const KritzelWorkspaceManager = class {
|
|
|
24216
24266
|
}
|
|
24217
24267
|
async initializeEngine() {
|
|
24218
24268
|
await customElements.whenDefined('kritzel-engine');
|
|
24219
|
-
|
|
24269
|
+
// Search for kritzel-engine in the closest kritzel-editor ancestor
|
|
24270
|
+
const editor = this.host.closest('kritzel-editor');
|
|
24271
|
+
this.kritzelEngineRef = editor?.querySelector('kritzel-engine') ?? null;
|
|
24220
24272
|
if (!this.kritzelEngineRef) {
|
|
24221
|
-
console.warn('kritzel-engine not found in
|
|
24273
|
+
console.warn('kritzel-engine not found in kritzel-editor.');
|
|
24222
24274
|
}
|
|
24223
24275
|
}
|
|
24224
24276
|
async select(item, parent) {
|
|
@@ -14,6 +14,9 @@ export class KritzelStore {
|
|
|
14
14
|
get currentZIndex() {
|
|
15
15
|
return Math.max(0, ...this._state.objects.filter(o => !(o instanceof KritzelSelectionGroup) && !(o instanceof KritzelSelectionBox)).map(o => o.zIndex)) + 1;
|
|
16
16
|
}
|
|
17
|
+
get totalObjectCount() {
|
|
18
|
+
return this._state.objects.totalCount;
|
|
19
|
+
}
|
|
17
20
|
get allObjects() {
|
|
18
21
|
return this._state.objects.allObjects();
|
|
19
22
|
}
|
|
@@ -98,7 +98,6 @@ export class KritzelViewport {
|
|
|
98
98
|
this._core.store.state.skipContextMenu = true;
|
|
99
99
|
this._core.rerender();
|
|
100
100
|
this._debounceUpdate();
|
|
101
|
-
this._core.engine.emitObjectsInViewportChange();
|
|
102
101
|
}
|
|
103
102
|
}
|
|
104
103
|
if (event.pointerType === 'touch') {
|
|
@@ -135,7 +134,6 @@ export class KritzelViewport {
|
|
|
135
134
|
this._core.store.state.hasViewportChanged = true;
|
|
136
135
|
this._core.rerender();
|
|
137
136
|
this._debounceUpdate();
|
|
138
|
-
this._core.engine.emitObjectsInViewportChange();
|
|
139
137
|
}
|
|
140
138
|
}
|
|
141
139
|
}
|
|
@@ -172,7 +170,6 @@ export class KritzelViewport {
|
|
|
172
170
|
this._core.store.state.hasViewportChanged = true;
|
|
173
171
|
this._core.rerender();
|
|
174
172
|
this._debounceUpdate();
|
|
175
|
-
this._core.engine.emitObjectsInViewportChange();
|
|
176
173
|
}
|
|
177
174
|
centerFitInViewport(object) {
|
|
178
175
|
const scaleX = this._core.store.state.viewportWidth / (object.rotatedBoundingBox.width * 1.1);
|
|
@@ -202,7 +199,6 @@ export class KritzelViewport {
|
|
|
202
199
|
this._core.rerender();
|
|
203
200
|
this._debounceUpdate();
|
|
204
201
|
this._debounceEndScaling();
|
|
205
|
-
this._core.engine.emitObjectsInViewportChange();
|
|
206
202
|
}
|
|
207
203
|
handlePan(event) {
|
|
208
204
|
const panSpeed = 0.8;
|
|
@@ -211,7 +207,6 @@ export class KritzelViewport {
|
|
|
211
207
|
this._core.store.state.hasViewportChanged = true;
|
|
212
208
|
this._core.rerender();
|
|
213
209
|
this._debounceUpdate();
|
|
214
|
-
this._core.engine.emitObjectsInViewportChange();
|
|
215
210
|
}
|
|
216
211
|
/**
|
|
217
212
|
* Cancels any ongoing viewport animation.
|
|
@@ -253,7 +248,6 @@ export class KritzelViewport {
|
|
|
253
248
|
else {
|
|
254
249
|
this._animationFrameId = null;
|
|
255
250
|
this._debounceUpdate();
|
|
256
|
-
this._core.engine.emitObjectsInViewportChange();
|
|
257
251
|
}
|
|
258
252
|
};
|
|
259
253
|
this._animationFrameId = requestAnimationFrame(animate);
|
|
@@ -3,6 +3,11 @@ export class KritzelQuadtree {
|
|
|
3
3
|
capacity;
|
|
4
4
|
objects = [];
|
|
5
5
|
children = null;
|
|
6
|
+
_size = 0;
|
|
7
|
+
/** Total number of objects in the quadtree (O(1) access) */
|
|
8
|
+
get size() {
|
|
9
|
+
return this._size;
|
|
10
|
+
}
|
|
6
11
|
constructor(bounds, capacity = 16) {
|
|
7
12
|
this.bounds = bounds;
|
|
8
13
|
this.capacity = capacity;
|
|
@@ -10,6 +15,7 @@ export class KritzelQuadtree {
|
|
|
10
15
|
reset() {
|
|
11
16
|
this.objects = [];
|
|
12
17
|
this.children = null;
|
|
18
|
+
this._size = 0;
|
|
13
19
|
}
|
|
14
20
|
insert(object) {
|
|
15
21
|
if (!this.intersects(object.rotatedBoundingBox, this.bounds)) {
|
|
@@ -17,6 +23,7 @@ export class KritzelQuadtree {
|
|
|
17
23
|
}
|
|
18
24
|
if (this.objects.length < this.capacity && this.children === null) {
|
|
19
25
|
this.objects.push(object);
|
|
26
|
+
this._size++;
|
|
20
27
|
return true;
|
|
21
28
|
}
|
|
22
29
|
if (this.children === null) {
|
|
@@ -24,6 +31,7 @@ export class KritzelQuadtree {
|
|
|
24
31
|
}
|
|
25
32
|
for (const child of this.children) {
|
|
26
33
|
if (child.insert(object)) {
|
|
34
|
+
this._size++;
|
|
27
35
|
return true;
|
|
28
36
|
}
|
|
29
37
|
}
|
|
@@ -45,15 +53,19 @@ export class KritzelQuadtree {
|
|
|
45
53
|
return false;
|
|
46
54
|
}
|
|
47
55
|
remove(predicate) {
|
|
56
|
+
let removed = 0;
|
|
48
57
|
const index = this.objects.findIndex(o => predicate(o));
|
|
49
58
|
if (index !== -1) {
|
|
50
59
|
this.objects.splice(index, 1);
|
|
60
|
+
removed++;
|
|
51
61
|
}
|
|
52
62
|
if (this.children !== null) {
|
|
53
63
|
for (const child of this.children) {
|
|
54
|
-
child.remove(predicate);
|
|
64
|
+
removed += child.remove(predicate);
|
|
55
65
|
}
|
|
56
66
|
}
|
|
67
|
+
this._size -= removed;
|
|
68
|
+
return removed;
|
|
57
69
|
}
|
|
58
70
|
query(range) {
|
|
59
71
|
const results = [];
|
|
@@ -258,6 +258,7 @@ export class KritzelEditor {
|
|
|
258
258
|
this.undoState = event.detail;
|
|
259
259
|
}
|
|
260
260
|
handleObjectsInViewportChange(event) {
|
|
261
|
+
console.log(event.detail.length);
|
|
261
262
|
const hasVisibleObjects = event.detail.length > 0;
|
|
262
263
|
this.isBackToContentButtonVisible = !hasVisibleObjects;
|
|
263
264
|
}
|
|
@@ -313,7 +314,7 @@ export class KritzelEditor {
|
|
|
313
314
|
}
|
|
314
315
|
}
|
|
315
316
|
render() {
|
|
316
|
-
return (h(Host, { key: '
|
|
317
|
+
return (h(Host, { key: '18113021f28ed340017ed15b3db83f275a1a45e0' }, h("div", { key: '75c4fc6fb48133edc3b9b2152c09d1b77dc3efc6', class: "top-left-buttons" }, h("kritzel-workspace-manager", { key: 'c6a68abaf70ebcf37af1870b832c9a2bd2c984fb', workspaces: this.workspaces, activeWorkspace: this.activeWorkspace, onWorkspaceChange: event => (this.activeWorkspace = event.detail), onIsWorkspaceManagerReady: () => (this.isWorkspaceManagerReady = true) }), h("kritzel-back-to-content", { key: 'e2be6fadb0a44dd6cc7a061767bc25b11dde5bf3', visible: this.isBackToContentButtonVisible, onBackToContent: () => this.backToContent() })), h("kritzel-engine", { key: '16c19e74e9a3bd61845fa3542a5a84a12a3c8a05', ref: el => (this.engineRef = el), workspace: this.activeWorkspace, syncConfig: this.syncConfig, scaleMax: this.scaleMax, lockDrawingScale: this.lockDrawingScale, scaleMin: this.scaleMin, globalContextMenuItems: this.globalContextMenuItems, objectContextMenuItems: this.objectContextMenuItems, onIsEngineReady: event => this.onEngineReady(event), onWorkspacesChange: event => this.handleWorkspacesChange(event), onObjectsChange: event => this.handleObjectsChange(event), onUndoStateChange: event => this.handleUndoStateChange(event), onObjectsInViewportChange: event => this.handleObjectsInViewportChange(event) }), h("kritzel-controls", { key: 'bb328c89b4ebbcce215e6ddf710126e7a71b5d30', class: { 'keyboard-open': this.isVirtualKeyboardOpen }, style: { display: this.isControlsVisible ? 'flex' : 'none' }, ref: el => (this.controlsRef = el), controls: this.controls, isUtilityPanelVisible: this.isUtilityPanelVisible, undoState: this.undoState, onIsControlsReady: () => (this.isControlsReady = true) }), h("div", { key: 'e7fd78379d8acc4715605c267aa352430633f6ac', class: "top-right-buttons" }, h("kritzel-settings", { key: '13db94ca32cabfbd2d6664c58f55e30fcbf99221', ref: el => (this.settingsRef = el), onSettingsChange: event => this.handleSettingsChange(event) }), h("kritzel-export", { key: 'a7aa9b6ada8b0d47edf418c392d6d04598d36925', ref: el => (this.exportRef = el), onExportPng: () => this.engineRef.exportViewportAsPng(), onExportSvg: () => this.engineRef.exportViewportAsSvg() }), h("kritzel-more-menu", { key: '70a1a954f678e6b634d5965b23f570f79824af43', onItemSelect: event => this.handleMoreMenuItemSelect(event) }))));
|
|
317
318
|
}
|
|
318
319
|
static get is() { return "kritzel-editor"; }
|
|
319
320
|
static get originalStyleUrls() {
|