@progress/kendo-ui
Version:
This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.
1 lines • 1.84 kB
JavaScript
module.exports=function(t){function e(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}({0:function(t,e,i){t.exports=i(911)},3:function(t,e){t.exports=function(){throw Error("define cannot be used indirect")}},884:function(t,e){t.exports=require("../../kendo.drawing")},911:function(t,e,i){var n,o,r;!function(s,define){o=[i(884)],n=s,r="function"==typeof n?n.apply(e,o):n,!(void 0!==r&&(t.exports=r))}(function(){!function(){var t=window.kendo,e=t.ui.Widget,i=t.template,n=t.drawing.util,o=n.valueOrDefault,r=n.defined,s=e.extend({init:function(t,i){e.fn.init.call(this,t,i),this._initOptions(i),this.items=[],this.element.addClass("k-widget k-attribution")},options:{name:"Attribution",separator:" | ",itemTemplate:"#= text #"},filter:function(t,e){this._extent=t,this._zoom=e,this._render()},add:function(t){r(t)&&("string"==typeof t&&(t={text:t}),this.items.push(t),this._render())},remove:function(t){var e,i,n=[];for(e=0;e<this.items.length;e++)i=this.items[e],i.text!==t&&n.push(i);this.items=n,this._render()},clear:function(){this.items=[],this.element.empty()},_render:function(){var t,e,n,o=[],r=i(this.options.itemTemplate);for(t=0;t<this.items.length;t++)e=this.items[t],n=this._itemText(e),""!==n&&o.push(r({text:n}));o.length>0?this.element.empty().append(o.join(this.options.separator)).show():this.element.hide()},_itemText:function(t){var e="",i=this._inZoomLevel(t.minZoom,t.maxZoom),n=this._inArea(t.extent);return i&&n&&(e+=t.text),e},_inZoomLevel:function(t,e){var i=!0;return t=o(t,-Number.MAX_VALUE),e=o(e,Number.MAX_VALUE),i=this._zoom>t&&this._zoom<e},_inArea:function(t){var e=!0;return t&&(e=t.contains(this._extent)),e}});t.dataviz.ui.plugin(s)}(window.kendo.jQuery)},i(3))}});