//>>built
define("dojox/drawing/plugins/tools/Iconize",["dojo","../../util/oo","../_Plugin","../../manager/_registry"],function(f,b,l,m){b=b.declare(l,function(c){},{onClick:function(){var c,e;for(e in this.stencils.stencils)if("path"==this.stencils.stencils[e].shortType){c=this.stencils.stencils[e];break}c&&this.makeIcon(c.points)},makeIcon:function(c){var e=1E4,b=1E4;c.forEach(function(a){void 0===a.x||isNaN(a.x)||(e=Math.min(e,a.x),b=Math.min(b,a.y))});var g=0,h=0;c.forEach(function(a){void 0===a.x||isNaN(a.x)||
(a.x=Number((a.x-e).toFixed(1)),a.y=Number((a.y-b).toFixed(1)),g=Math.max(g,a.x),h=Math.max(h,a.y))});c.forEach(function(a){a.x=60*Number((a.x/g).toFixed(1))+20;a.y=60*Number((a.y/h).toFixed(1))+20});var d="[\n";f.forEach(c,function(a,b){d+="{\t";a.t&&(d+="t:'"+a.t+"'");void 0===a.x||isNaN(a.x)||(a.t&&(d+=", "),d+="x:"+a.x+",\t\ty:"+a.y);d+="\t}";b!=c.length-1&&(d+=",");d+="\n"});var d=d+"]",k=f.byId("data");k&&(k.value=d)}});b.setup={name:"dojox.drawing.plugins.tools.Iconize",tooltip:"Iconize Tool",
iconClass:"iconPan"};f.setObject("dojox.drawing.plugins.tools.Iconize",b);m.register(b.setup,"plugin");return b});
//# sourceMappingURL=Iconize.js.map