cybersthang / gmaps-utility-library-dev

Automatically exported from code.google.com/p/gmaps-utility-library-dev
0 stars 0 forks source link

When zooming on multimap example, both maps get grey cover #93

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Load http://gmaps-utility-library-
dev.googlecode.com/svn/trunk/keydragzoom/examples/multimap.html
2. Drag to zoom in one of them
3. Notice both maps are covered in a gray div during the drag

What is the expected output? What do you see instead?
I expect that only the map I'm zooming on will have the gray div.

Please use labels and text to provide additional information.

Original issue reported on code.google.com by pamela.fox on 8 Mar 2009 at 8:28

GoogleCodeExporter commented 8 years ago
Both maps are covered in gray when you press the hot key because they both 
receive the keydown event and 
react by highlighting themselves. At this point it is impossible to know which 
map is going to be clicked, so this 
is the correct behavior. Once the mouse drag starts on one map, I suppose it 
would be nice if the other map 
returned to normal, but that would mean adding considerable more complexity -- 
would need a class method 
that could be called from one map to turn off highlighting of the other map; 
the class would have to keep track 
of all active instances for this to work. This would get even trickier if the 
hot key was different for the other map 
-- you'd have to check for that and do nothing if that was the case. Perhaps 
Nianwei has some ideas on 
implementing this (or whether it's really worthwhile).

Original comment by garylitt...@gmail.com on 8 Mar 2009 at 9:58

GoogleCodeExporter commented 8 years ago
Hmm..what if you only did the grey cover on the map that the mouse cursor was 
currently over?

Original comment by pamela.fox on 8 Mar 2009 at 11:09

GoogleCodeExporter commented 8 years ago
There probably no perfect solution for this cause the user expectation may vary 
on
different situation. I put in an extra condition of "activation" that shows 
behavior
Pamela described. Basically, only the one with mouse on get activated. There are
still minor potential usability issue, but I think the chance of running into 
them is
so slim that it's probably not worth the risk to break other behavior. 

See r958 for the new version. 
http://gmaps-utility-library-dev.googlecode.com/svn-history/r958/trunk/keydragzo
om/examples/multimap.html

Original comment by nian...@gmail.com on 9 Mar 2009 at 3:24

GoogleCodeExporter commented 8 years ago
merged Gary's code in r963

Original comment by nian...@gmail.com on 16 Mar 2009 at 2:04

GoogleCodeExporter commented 8 years ago

Original comment by pamela.fox on 23 Jun 2009 at 9:24