2 lines
1.4 KiB
JavaScript
2 lines
1.4 KiB
JavaScript
var T=Object.defineProperty;var a=Object.getOwnPropertySymbols;var h=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable;var r=(e,t,s)=>t in e?T(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,i=(e,t)=>{for(var s in t||(t={}))h.call(t,s)&&r(e,s,t[s]);if(a)for(var s of a(t))l.call(t,s)&&r(e,s,t[s]);return e};import{c1 as g,aA as p,D as u,S as y}from"./index.js";import{u as A}from"./chartEditStore-18a9cd2a.js";var n=(e=>(e.SINGLE="single",e.DOUBLE="double",e))(n||{}),c=(e=>(e.THUMBNAIL="thumbnail",e.TEXT="text",e))(c||{}),S=(e=>(e.LAYERS="layers",e.CHARTS="charts",e.DETAILS="details",e.Chart_TYPE="chartType",e.LAYER_TYPE="layerType",e.PERCENTAGE="percentage",e.RE_POSITION_CANVAS="rePositionCanvas",e))(S||{});const C=A(),{GO_CHART_LAYOUT_STORE:o}=y,L=g(o),d=p({id:"useChartLayoutStore",state:()=>i({layers:!0,charts:!0,details:!1,chartType:n.SINGLE,layerType:c.THUMBNAIL,percentage:0,rePositionCanvas:!1},L),getters:{getLayers(){return this.layers},getCharts(){return this.charts},getDetails(){return this.details},getChartType(){return this.chartType},getLayerType(){return this.layerType},getPercentage(){return this.percentage},getRePositionCanvas(){return this.rePositionCanvas}},actions:{setItem(e,t){this.$patch(s=>{s[e]=t}),u(o,this.$state),this.rePositionCanvas=!0,setTimeout(()=>{C.computedScale()},500)},setItemUnHandle(e,t){this.$patch(s=>{s[e]=t})}}});export{S as C,c as L,n as a,d as u};
|