UNPKG

@progress/kendo-ui

Version:

This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.

1 lines 1.74 kB
module.exports=function(t){function o(e){if(n[e])return n[e].exports;var i=n[e]={exports:{},id:e,loaded:!1};return t[e].call(i.exports,i,i.exports,o),i.loaded=!0,i.exports}var n={};return o.m=t,o.c=n,o.p="",o(0)}({0:function(t,o,n){t.exports=n(932)},3:function(t,o){t.exports=function(){throw Error("define cannot be used indirect")}},887:function(t,o){t.exports=require("../../kendo.core")},932:function(t,o,n){var e,i,r;!function(s,define){i=[n(887)],e=s,r="function"==typeof e?e.apply(o,i):e,!(void 0!==r&&(t.exports=r))}(function(){!function(t){function o(t,o){return n.format('<button class="k-button k-button-icon k-zoom-{0}" title="zoom-{0}" aria-label="zoom-{0}"><span class="k-icon {1}"></span></button>',t,o)}var n=window.kendo,e=n.ui.Widget,i=n.keys,r=t.proxy,s=".kendoZoomControl",c=o("in","k-i-plus")+o("out","k-i-minus"),a=187,u=189,h=61,l=173,d=e.extend({init:function(t,o){e.fn.init.call(this,t,o),this._initOptions(o),this.element.addClass("k-widget k-zoom-control k-button-group k-group-horizontal").append(c).on("click"+s,".k-button",r(this,"_click"));var i=this.element.parent().closest("["+n.attr("role")+"]");this._keyroot=i.length>0?i:this.element,this._tabindex(this._keyroot),this._keydown=r(this._keydown,this),this._keyroot.on("keydown",this._keydown)},options:{name:"ZoomControl",zoomStep:1},events:["change"],_change:function(t){var o=this.options.zoomStep;this.trigger("change",{delta:t*o})},_click:function(o){var n=t(o.currentTarget),e=1;n.is(".k-zoom-out")&&(e=-1),this._change(e),o.preventDefault()},_keydown:function(t){switch(t.which){case i.NUMPAD_PLUS:case a:case h:this._change(1);break;case i.NUMPAD_MINUS:case u:case l:this._change(-1)}}});n.dataviz.ui.plugin(d)}(window.kendo.jQuery)},n(3))}});