/*
	Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


window[esri._dojoScopeName||"dojo"]._xdResourceLoaded(function(_1,_2,_3){return {depends:[["provide","dojox.drawing.ui.dom.Zoom"],["require","dojox.drawing.plugins._Plugin"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["dojox.drawing.ui.dom.Zoom"]){_4._hasResource["dojox.drawing.ui.dom.Zoom"]=true;_4.provide("dojox.drawing.ui.dom.Zoom");_4.require("dojox.drawing.plugins._Plugin");_6.drawing.ui.dom.Zoom=_6.drawing.util.oo.declare(_6.drawing.plugins._Plugin,function(_7){var _8=_7.node.className;var _9=_7.node.innerHTML;this.domNode=_4.create("div",{id:"btnZoom","class":"toolCombo"},_7.node,"replace");this.makeButton("ZoomIn",this.topClass);this.makeButton("Zoom100",this.midClass);this.makeButton("ZoomOut",this.botClass);},{type:"dojox.drawing.ui.dom.Zoom",zoomInc:0.1,maxZoom:10,minZoom:0.1,zoomFactor:1,baseClass:"drawingButton",topClass:"toolComboTop",midClass:"toolComboMid",botClass:"toolComboBot",makeButton:function(_a,_b){var _c=_4.create("div",{id:"btn"+_a,"class":this.baseClass+" "+_b,innerHTML:"<div title=\"Zoom In\" class=\"icon icon"+_a+"\"></div>"},this.domNode);_4.connect(document,"mouseup",function(_d){_4.stopEvent(_d);_4.removeClass(_c,"active");});_4.connect(_c,"mouseup",this,function(_e){_4.stopEvent(_e);_4.removeClass(_c,"active");this["on"+_a]();});_4.connect(_c,"mouseover",function(_f){_4.stopEvent(_f);_4.addClass(_c,"hover");});_4.connect(_c,"mousedown",this,function(evt){_4.stopEvent(evt);_4.addClass(_c,"active");});_4.connect(_c,"mouseout",this,function(evt){_4.stopEvent(evt);_4.removeClass(_c,"hover");});},onZoomIn:function(evt){this.zoomFactor+=this.zoomInc;this.zoomFactor=Math.min(this.zoomFactor,this.maxZoom);this.canvas.setZoom(this.zoomFactor);this.mouse.setZoom(this.zoomFactor);},onZoom100:function(evt){this.zoomFactor=1;this.canvas.setZoom(this.zoomFactor);this.mouse.setZoom(this.zoomFactor);},onZoomOut:function(evt){this.zoomFactor-=this.zoomInc;this.zoomFactor=Math.max(this.zoomFactor,this.minZoom);this.canvas.setZoom(this.zoomFactor);this.mouse.setZoom(this.zoomFactor);}});}}};});