goview_vue/dist/static/js/chartLayoutStore-810503fe.js
2023-06-06 13:24:29 +08:00

2 lines
1.4 KiB
JavaScript

var h=Object.defineProperty;var s=Object.getOwnPropertySymbols;var l=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable;var r=(e,t,a)=>t in e?h(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,i=(e,t)=>{for(var a in t||(t={}))l.call(t,a)&&r(e,a,t[a]);if(s)for(var a of s(t))g.call(t,a)&&r(e,a,t[a]);return e};import{aj as p,aW as u,bk as y,ak as A}from"./index-4ec2ce15.js";import{u as S}from"./chartEditStore-bfc6c223.js";var n=(e=>(e.SINGLE="single",e.DOUBLE="double",e))(n||{}),o=(e=>(e.THUMBNAIL="thumbnail",e.TEXT="text",e))(o||{}),C=(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))(C||{});const L=S(),{GO_CHART_LAYOUT_STORE:c}=A,P=p(c),v=u({id:"useChartLayoutStore",state:()=>i({layers:!0,charts:!0,details:!1,chartType:n.SINGLE,layerType:o.THUMBNAIL,percentage:0,rePositionCanvas:!1},P),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,a=!0){this.$patch(T=>{T[e]=t}),y(c,this.$state),this.rePositionCanvas=!0,a&&setTimeout(()=>{L.computedScale()},500)},setItemUnHandle(e,t){this.$patch(a=>{a[e]=t})}}});export{C,o as L,n as a,v as u};