johnjreiser

Exclusivity of Python Addin Tool Class - Clicks versus [Rectangle|Line|Circle]

Discussion created by johnjreiser on Dec 3, 2013
Right now, it appears that if you set self.shape to "Line", "Circle" or "Rectangle", a single mouse click will still be sent to the appropriate function, but the Extent object passed will have "NaN" values instead of coordinates. Wouldn't it be better if one of the following occurred instead?


  • onMouseUp/onMouseUpMap/onMouseDown/onMouseDownMap fires whenever there is a single click. self.shape="Line" would override this.

  • onRectangle and onCircle can receive a point as the variable passed into the function. Developers can then test for the type of the object, or test on hasattr(var, "XMin") versus hasattr(var, "X").

  • Some other semaphore to capture a point versus a drag-based geometry.

Or is there some workaround that I'm not seeing that would enable a tool to handle both onMouseDownMap and onRectangle functions?

Outcomes