Module: nagvis
Branch: master
Commit: 4d050613ce8ce563705c29819d3ef55ee4d89932
URL:    
http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis/commit/?id=4d050613ce8ce563705c29819d3ef55ee4d89932

Author: Roman Kyrylych <[email protected]>
Date:   Fri Aug 14 16:08:42 2009 +0300

gmap: Double click algorithm implemented.

---

 .../modules/gmap/view/controls/LocationMarker.as   |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/uifx/src/modules/gmap/view/controls/LocationMarker.as 
b/uifx/src/modules/gmap/view/controls/LocationMarker.as
index a0085c3..9170495 100644
--- a/uifx/src/modules/gmap/view/controls/LocationMarker.as
+++ b/uifx/src/modules/gmap/view/controls/LocationMarker.as
@@ -27,6 +27,8 @@ package modules.gmap.view.controls
                [Embed(source="modules/gmap/img/std_small_unknown.png")]

                protected static var unknownIcon : Class;                       
        

                                

+               private var _lastTimeClicked:Number = 0;                

+                       

                private var _location : Location;

                

                public function LocationMarker(location:Location)

@@ -51,8 +53,24 @@ package modules.gmap.view.controls
                        _location.addEventListener('change', this.onChange);

                }

                

+               /***

+                * Handles click & double click events

+                * because of the bug in Google Maps API

+                * 
http://code.google.com/p/gmaps-api-issues/issues/detail?id=394

+                ***/

                protected function onClick(event : *):void

                {

+                       var date:Date = new Date;

+

+                       if(date.time - _lastTimeClicked < 350)

+                       {

+                               dispatchEvent(

+                                       new 
LocationEvent(LocationEvent.ACTIVATE, _location, true)

+                               );

+                               return;

+                       }

+                       

+                       _lastTimeClicked = date.time;

                        dispatchEvent(

                                new LocationEvent(LocationEvent.SELECTED, 
_location, true)

                        );



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to