import{n as r}from"./index-b54f5418.js";import"./three-dc46505d.js";var s=function(){var t=this,i=t.$createElement,n=t._self._c||i;return n("div",{staticClass:"topNavigationFunctionElem-container"},[n("div",{directives:[{name:"tooltip",rawName:"v-tooltip.top",value:t.tooltip,expression:"tooltip",modifiers:{top:!0}}],staticClass:"elem-button",class:{active:t.active}},[t._t("default",function(){return[n("vis-icon",{attrs:{code:t.icon,size:t.size}})]})],2)])},l=[];const c={name:"TopNavigationFunctionElem",props:{icon:{type:String,default:"#iconxzhou"},tooltip:{type:String,default:"提示"},active:{type:Boolean,default:!1}},data(){return{size:"20px"}}},e={};var u=r(c,s,l,!1,p,"251bc487",null,null);function p(t){for(let i in e)this[i]=e[i]}const f=function(){return u.exports}();var v=function(){var t=this,i=t.$createElement,n=t._self._c||i;return n("div",{staticClass:"functionNavigation-container"},[n("div",{staticClass:"function-part"},[n("top-navigation-function-elem",{attrs:{tooltip:"撤销",icon:"#iconredo",active:t.undo},nativeOn:{click:function(o){return(function(){t.$store.commit("history/undo")}).apply(null,arguments)}}}),n("top-navigation-function-elem",{attrs:{tooltip:"恢复",icon:"#iconhuifu",active:t.redo},nativeOn:{click:function(o){return(function(){t.$store.commit("history/redo")}).apply(null,arguments)}}})],1),n("div",{staticClass:"function-part"},[n("top-navigation-function-elem",{attrs:{tooltip:"x轴",icon:"#iconxzhou",active:t.showX},nativeOn:{click:function(o){return(function(){t.transformControls.showX=!t.showX}).apply(null,arguments)}}}),n("top-navigation-function-elem",{attrs:{tooltip:"y轴",icon:"#iconyzhou",active:t.showY},nativeOn:{click:function(o){return(function(){t.transformControls.showY=!t.showY}).apply(null,arguments)}}}),n("top-navigation-function-elem",{attrs:{tooltip:"z轴",icon:"#iconzzhou",active:t.showZ},nativeOn:{click:function(o){return(function(){t.transformControls.showZ=!t.showZ}).apply(null,arguments)}}})],1),n("div",{staticClass:"function-part"},[n("top-navigation-function-elem",{attrs:{tooltip:"平移",icon:"#iconpingyi",active:t.mode==="position"},nativeOn:{click:function(o){return(function(){t.transformControls.mode="position"}).apply(null,arguments)}}}),n("top-navigation-function-elem",{attrs:{tooltip:"缩放",icon:"#iconsuofang",active:t.mode==="scale"},nativeOn:{click:function(o){return(function(){t.transformControls.mode="scale"}).apply(null,arguments)}}}),n("top-navigation-function-elem",{attrs:{tooltip:"旋转",icon:"#iconxuanzhuan1",active:t.mode==="rotation"},nativeOn:{click:function(o){return(function(){t.transformControls.mode="rotation"}).apply(null,arguments)}}})],1),n("div",{staticClass:"function-part"},[n("top-navigation-function-elem",{attrs:{tooltip:"本地变换",icon:"#iconbendibianhuan",active:t.space==="local"},nativeOn:{click:function(o){return(function(){t.transformControls.space="local"}).apply(null,arguments)}}}),n("top-navigation-function-elem",{attrs:{tooltip:"世界变换",icon:"#iconshijiebianhuan",active:t.space==="world"},nativeOn:{click:function(o){return(function(){t.transformControls.space="world"}).apply(null,arguments)}}})],1),n("div",{staticClass:"function-part"},[n("top-navigation-function-elem",{attrs:{tooltip:"步幅",icon:"#iconxifu",active:t.snapAllow},nativeOn:{click:function(o){return(function(){t.transformControls.snapAllow=!t.snapAllow}).apply(null,arguments)}}}),n("top-navigation-function-elem",{attrs:{tooltip:"平移"}},[n("el-input",{attrs:{size:"mini"},model:{value:t.transformControls.translationSnap,callback:function(o){t.$set(t.transformControls,"translationSnap",o)},expression:"transformControls.translationSnap"}})],1),n("top-navigation-function-elem",{attrs:{tooltip:"旋转"}},[n("el-input",{attrs:{size:"mini"},model:{value:t.rotationSnap,callback:function(o){t.rotationSnap=o},expression:"rotationSnap"}})],1),n("top-navigation-function-elem",{attrs:{tooltip:"缩放"}},[n("el-input",{attrs:{size:"mini"},model:{value:t.transformControls.scaleSnap,callback:function(o){t.$set(t.transformControls,"scaleSnap",o)},expression:"transformControls.scaleSnap"}})],1)],1)])},m=[];const d={components:{topNavigationFunctionElem:f},data(){return{size:"20px"}},computed:{transformControls(){return this.$store.getters["controls/transformControls"]},mode(){return this.transformControls.mode},space(){return this.transformControls.space},showX(){return this.transformControls.showX},showY(){return this.transformControls.showY},showZ(){return this.transformControls.showZ},snapAllow(){return this.transformControls.snapAllow},rotationSnap:{get(){return this.transformControls.rotationSnap*180/Math.PI},set(t){this.transformControls.rotationSnap=t*Math.PI/180}},redo(){return this.$store.getters["history/redoStatus"]},undo(){return this.$store.getters["history/undoStatus"]}}},a={};var _=r(d,v,m,!1,h,"7b637df4",null,null);function h(t){for(let i in a)this[i]=a[i]}const y=function(){return _.exports}();export{y as default};
