Set delay for tooltips

8 views
Skip to first unread message

James Nordgaard

unread,
Mar 24, 2010, 1:28:12 AM3/24/10
to cyclop...@googlegroups.com
In adding tooltips for byways, I implemented a timer to delay the display of the tooltips of 140ms to prevent a blizzard of flashing tooltips when moving the mouse quickly across the map. In the code review Fernando suggested we set the tooltip delay gobally:

> - I wonder if we should change the tooltip display delay for all tooltips in
> Cyclopath. If we do, you could get rid of all the Timer code and simply change
> the showdelay property of the ToolTipManager. 140ms is also fast enough to not
> cause any problems in other parts of the code that use tooltips. You could send
> an email to the developer mailing list to see if anyone has any opinions on the
> matter.
I agree with this.

Comments?

Jim

Michael Ludwig

unread,
Mar 24, 2010, 12:46:46 PM3/24/10
to cyclop...@googlegroups.com
It seems like a global change would simplify the code a lot. If 140ms
works in the other areas of the UI (I don't know what the default
delay is), the only question we have to answer is whether or not a
single tooltip time is a good thing for things in the map and the side
panels. I think it is, so I'd suggest trying it out and seeing what
the UI feels like.

Thanks,
Michael

> --
> You received this message because you are subscribed Cyclopath Development.
> To post to this group: send email to cyclop...@googlegroups.com
> To read this group on the Web: http://groups.google.com/group/cyclopath-dev
> To unsubscribe from this group: send email to
> cyclopath-de...@googlegroups.com
>
> To unsubscribe from this group, send email to
> cyclopath-dev+unsubscribegooglegroups.com or reply to this email with the
> words "REMOVE ME" as the subject.
>

Reid Priedhorsky

unread,
Mar 24, 2010, 1:14:44 PM3/24/10
to cyclop...@googlegroups.com
On 03/24/2010 11:46 AM, Michael Ludwig wrote:
>
> It seems like a global change would simplify the code a lot. If 140ms
> works in the other areas of the UI (I don't know what the default
> delay is), the only question we have to answer is whether or not a
> single tooltip time is a good thing for things in the map and the side
> panels. I think it is, so I'd suggest trying it out and seeing what
> the UI feels like.

Two comments:

1. I think this feature should be configurable, and perhaps turned off
by default, to avoid overwhelming new users.

2. What's the current tooltip delay time? I assume 140ms is shorter -
how was this time obtained? What's the reasoning for making it shorter?

Reid

Fernando Torre

unread,
Mar 24, 2010, 1:27:17 PM3/24/10
to cyclop...@googlegroups.com

Hmm, that's true. The default delay is 500ms. It feels like a lot less though. Try moving the mouse over a point a couple of times. The tooltip appears almost instantaneously. This instantaneous behavior is really annoying for byway tooltips. When Jim implemented it as a timer, 140ms actually seemed to give it a reasonable delay, but it seems that 140ms in the timer are not the same as 140ms in the actual tooltip delay.

Fernando

James Nordgaard

unread,
Mar 24, 2010, 1:38:46 PM3/24/10
to cyclop...@googlegroups.com
The tooltip on map features is instantaneous, for everything else it's 500ms. I can't find where it's set anywhere so I don't know why the difference. Can we set this by window?

Michael Ludwig

unread,
Mar 29, 2010, 3:34:32 PM3/29/10
to cyclop...@googlegroups.com
A good place to look would be in the documentation for ToolTipManager.
It has a parameter called showDelay that defaults to 500 ms. I will
need to examine the code again to check where points and regions get
their tooltips. It may be the case that they manually override the
default show time.

-Michael

Reply all
Reply to author
Forward
0 new messages