//>>built
define("dojox/treemap/ScaledLabel",["dojo/_base/declare","dojo/dom-geometry","dojo/dom-construct","dojo/dom-style"],function(l,b,k,e){return l("dojox.treemap.ScaledLabel",null,{onRendererUpdated:function(a){if("leaf"==a.kind){a=a.renderer;var c=e.get(a,"fontSize");e.set(a.firstChild,"fontSize",c);c=parseInt(c);var d=.75*b.getContentBox(a).w/b.getMarginBox(a.firstChild).w,f=b.getContentBox(a).h/b.getMarginBox(a.firstChild).h,g=b.getContentBox(a).w-b.getMarginBox(a.firstChild).w,h=b.getContentBox(a).h-
b.getMarginBox(a.firstChild).h;for(d=Math.floor(c*Math.min(d,f));0<h&&0<g;)e.set(a.firstChild,"fontSize",d+"px"),g=b.getContentBox(a).w-b.getMarginBox(a.firstChild).w,h=b.getContentBox(a).h-b.getMarginBox(a.firstChild).h,c=d,d+=1;(0>h||0>g)&&e.set(a.firstChild,"fontSize",c+"px")}},createRenderer:function(a,c,d){var f=this.inherited(arguments);if("leaf"==d){var g=k.create("div");e.set(g,{position:"absolute",width:"auto"});k.place(g,f)}return f},styleRenderer:function(a,c,d,f){"leaf"!=f?this.inherited(arguments):
(e.set(a,"background",this.getColorForItem(c).toHex()),a.firstChild.innerHTML=this.getLabelForItem(c))}})});