moodle_local_treestudyplan/amd/build/vue-color-picker-wheel.min.js

3 lines
14 KiB
JavaScript
Raw Normal View History

define("local_treestudyplan/vue-color-picker-wheel",["exports"],(function(_exports){Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,_exports.install=install;var component=function(template,style,script$$1,scope,functional,moduleIdentifier,createInjector,createInjectorSSR){var hook,component=("function"==typeof script$$1?script$$1.options:script$$1)||{};if(component.__file="color-picker.vue",component.render||(component.render=template.render,component.staticRenderFns=template.staticRenderFns,component._compiled=!0,functional&&(component.functional=!0)),component._scopeId=scope,style&&(hook=function(context){style.call(this,createInjector(context))}),void 0!==hook)if(component.functional){var originalRender=component.render;component.render=function(h,context){return hook.call(context),originalRender(h,context)}}else{var existing=component.beforeCreate;component.beforeCreate=existing?[].concat(existing,hook):[hook]}return component}({render:function(){var _vm=this,_h=_vm.$createElement,_c=_vm._self._c||_h;return _c("div",{ref:"color-wheel",staticClass:"cpw_container",class:{s_disabled:_vm.disabled},style:{width:_vm.width+"px",height:_vm.height+"px",position:"relative"},attrs:{id:"color-wheel"}},[_c("div",{ref:"farbtastic-solid",staticClass:"farbtastic-solid",staticStyle:{position:"absolute"},style:_vm.solidStyle}),_vm._v(" "),_c("canvas",{ref:"farbtastic-mask",staticClass:"farbtastic-mask",style:{width:_vm.width,height:_vm.height},attrs:{width:_vm.width,height:_vm.height}}),_vm._v(" "),_c("canvas",{ref:"farbtastic-overlay",staticClass:"farbtastic-overlay",style:{width:_vm.width,height:_vm.height},attrs:{width:_vm.width,height:_vm.height},on:{mousedown:_vm.mousedown,touchstart:_vm.touchHandleStart,touchmove:_vm.touchHandleMove,touchend:_vm.touchHandleEnd}})])},staticRenderFns:[]},(function(inject){inject&&inject("data-v-58e7c5c8_0",{source:"\n.s_disabled[data-v-58e7c5c8]{opacity:.5\n}\n.cpw_container[data-v-58e7c5c8]{-webkit-touch-callout:none;-webkit-text-size-adjust:none;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;tap-highlight-color:transparent;tap-highlight-color:transparent;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none\n}\n.cpw_container .farbtastic-mask[data-v-58e7c5c8]{position:absolute;left:0\n}\n.cpw_container .farbtastic-overlay[data-v-58e7c5c8]{position:absolute;left:0\n}",map:void 0,media:void 0})}),{name:"color-picker",props:{width:{required:!1,type:Number,default:300},height:{required:!1,type:Number,default:300},disabled:{required:!1,type:Boolean,default:!1},startColor:{required:!1,type:String},value:{required:!1,type:String}},mounted:function(){this.hasCamelCaseColorChangeListener&&console.warn("Using the colorChange event is deprecated since version 0.4.0. It will be deleted in version 1.0.0. 'v-model' or the kebab-case variant 'color-change' should be used."),this.initWidget(),this.setColor(this.value||this.startColor||"#000000")},data:function(){return{debug:!1,dragging:!1,circleDrag:!1,color:"",rgb:"",hsl:"",radius:"",square:"",mid:"",markerSize:"",ctxMask:"",ctxOverlay:"",cnvMask:"",cnvOverlay:"",offset:{left:"",top:""}}},watch:{value:function(newVal,oldVal){newVal!==oldVal&&this.setColor(newVal)}},computed:{hasCamelCaseColorChangeListener:function(){return this.$listeners&&this.$listeners.colorChange},solidStyle:function(){return{"background-color":this.pack(this.HSLToRGB([this.hsl[0],1,.5])),width:2*this.square-1+"px",height:2*this.square-1+"px",left:this.mid-this.square+"px",top:this.mid-this.square+"px"}},wheelWidth:function(){return(this.width||300)/10}},methods:{setColor:function(color,noEmit){void 0===noEmit&&(noEmit=!1);var unpack=this.unpack(color);return this.color!==color&&unpack&&(this.color=color,this.rgb=unpack,this.hsl=this.RGBToHSL(this.rgb),this.updateDisplay(noEmit)),this},setHSL:function(hsl){return this.hsl=hsl,this.rgb=this.HSLToRGB(hsl),this.color=this.pack(this.rgb),this.updateDisplay(),this},initWidget:function(){this.radius=(this.width-this.wheelWidth)/2-1,this.square=Math.floo
//# sourceMappingURL=vue-color-picker-wheel.min.js.map