[GRASS5] d.legend, d.zoom

Hamish hamish_nospam at yahoo.com
Sun Aug 22 23:08:49 EDT 2004


> >> A small interface note. The autogenerated tcltk dialog for d.legend
> >> has a pulldown for the position coordinates. This pulldown (i.e.,
> >> #%options-> value,value,...) only contains the entry 0-100. This is
> >> also automatically entered in the field (i.e., #%answer->0-100).
> >This> is an incorrect format that generates an error unless it is
> >erased> each time d.legend is started.
> > 
> > I know. This is happens when there is "->options" specified but no
> > default value ("->answer"). Many of the other parameters have
> > options ranges (and therefore bounds checking) too, without harm.
> > The at option actually has "NULL" as the default answer. (default:
> > automatic sizing)
> 
> For position coordinates, this causes an error even if you use the
> 'set position with a mouse' flag. You are right, however, in that it
> does not cause an error for the other fields. A NULL with automatic
> sizing would actually be OK in the position coordinates if this
> worked.

So it is a problem with the menu generation, not d.legend..


> > d.barscale gets it right, but note it doesn't use D_color_list() so
> > no pull down menu for the colors. (cost of allowing R:G:B and
> > "none")
> > 
> > opt->options is also unaware of opt->multiple=YES; I'd prefer to
> > have it be   options: 0-100,0-100,0-100,0-100
> > and bounds checking on all inputs & an arg==4 check from that,
> > although sometimes it is useful to draw a bit beyond the edge of the
> > screen. This is another matter.
> 
> Since this doesn't work, what is the best solution at present? Disable
> the pulldown range checking or put a reasonable set of defaults in the
> answer-> field (e.g., 10, 20,10,90)?

but that would disable any check for automatic sizing. (If you give it
specific coordinates, d.legend will assume you know what you are doing
and draw off the edge of the screen, eg. This can be useful sometimes.)
hmmm.



> >> A couple questions about the full d.zoom command.
> >> 
> >> 1) Is there any reason to put this in the menus? That is, does it
> >do> anything that the 2 current menu entries (zoom in current window,
> >and zoom with pan in current window) don't accomplish?
> > 
> > -h handheld mode, probably mainly used via mouse/stylus input from
> > the menus and not entered on the command line from a tiny keyboard
> > if you can help it.  I've never used -j, maybe it is useful too?
> > 
> >  
> >> 2) What does the zoom magnification do? It would be nice, I
> >suppose, to be able to zoom to a percentage rather than just using a
> >mouse. But I can't seem to get it to work.
> > 
> > How fast it unzooms.
> 
> This is unclear. The description suggests it will zoom and unzoom. I
> think this would be more useful.

I doesn't seem to work right (or have any meaning) when "zoom=" is >1,
so that doesn't help.



> >> 3) We lost the pan function with the shift to GRASS 5.7. It would
> >be> nice to get it back somehow.
> > 
> > 'd.zoom -f'  does it, having d.pan as well is just more code to
> > maintain for no additional functionality. I guess we could have
> > 'd.zoom-p' which goes into pan mode automatically and the menu could
> > call that.
> > 
> > 
> > Perhaps a Zoom submenu which gives the three options:
> > 
> > - Zoom/Unzoom active display
> > - Pan and zoom active display
> > - Zoom with bells and whistles
> 
> I can do this. It does make sense. To me, an even better set would be
> 
> -zoom/unzoom in active display
> -pan in active display
> -zoom with bells and whistles

I agree.


> > which is a bit better placed than the current postition. As one of
> > the most used commands it shouldn't be right at the bottom of a long
> > list.
> 
> Your point is well taken. I guess I thought the most used commands
> should be at either end of the menu, but not in the middle. I did want
> to put erase somewhat away from the other commands so that a user is
> less apt to hit it by accident when searching for another command. How
> about if the zoom submenu is at the top, followed by nviz, etc, and
> d.erase is at the bottom.

Having d.zoom at the bottom as it is now is fine once you know where to
look for it; which you'll figure out pretty quickly I suppose.
shrug


> > maybe relegate "Pan&Zoom" to the bells and whistles one and have two
> > options in the submenu.
> 
> I think it is better to have an easily accessible pan option in the
> submenu than to bury it more in the 'zoom with options'

Ok, I'll see about adding 'd.zoom -p' for this.



Hamish




More information about the grass-dev mailing list