Evt_Draw_Rectangle.prototype=new Event();function Evt_Draw_Rectangle(){this._w=0;this._h=0;this._map_node=document.getElementById(_MAP_ID);this._jg=this._jg==null?new jsGraphics(_MAP_ID):this._jg;this._curr_x=0;this._curr_y=0;this._listener=null}Evt_Draw_Rectangle.prototype.mouse_move=function(a){var b=_MAP_WRAPPER.convert_to_relative_pixel_coords(a.clientX,a.clientY);this._curr_x=b[0];this._curr_y=b[1];this._w=this._curr_x-this._x_click;this._h=this._curr_y-this._y_click;this._x_mov=this._x_click;this._y_mov=this._y_click;if((b[0])<this._x_click){this._x_mov=Math.abs(b[0]);this._w=Math.abs(this._w)}if((b[1])<this._y_click){this._y_mov=Math.abs(b[1]);this._h=Math.abs(this._h)}this._jg.clear();this._jg.setColor("#000000");this._jg.drawRect(parseInt(this._x_mov),parseInt(this._y_mov),parseInt(this._w),parseInt(this._h));this._jg.paint();stop_propagating_event(a)};Evt_Draw_Rectangle.prototype.mouse_up=function(a){stop_propagating_event(a);this._jg.clear();if((this._x_mov==0)&&(this._y_mov==0)){return}this.do_operation()};Evt_Draw_Rectangle.prototype.do_operation=function(){};Evt_Draw_Rectangle.prototype.notify=function(){if(this._listener!=null){this._listener.notify_selected()}};Evt_Draw_Rectangle.prototype.add_listener=function(a){this._listener=a};
