Module: nagvis Branch: master Commit: 1a96da8bcbfea63714ce14f6f8b755e97e47f69c URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis/commit/?id=1a96da8bcbfea63714ce14f6f8b755e97e47f69c
Author: Andriy Skuratov <[email protected]> Date: Wed Aug 26 15:53:21 2009 +0300 gmap:Make it possibele to doubleclick on Links. --- uifx/src/modules/gmap/mediator/MapMD.as | 2 ++ .../modules/gmap/view/controls/GMapLinkControl.as | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 1 deletions(-) diff --git a/uifx/src/modules/gmap/mediator/MapMD.as b/uifx/src/modules/gmap/mediator/MapMD.as index 0e700fc..e3d9df0 100644 --- a/uifx/src/modules/gmap/mediator/MapMD.as +++ b/uifx/src/modules/gmap/mediator/MapMD.as @@ -22,6 +22,7 @@ package modules.gmap.mediator { import com.google.maps.LatLng; + import com.google.maps.MapAction; import com.google.maps.controls.ZoomControl; import flash.events.IEventDispatcher; @@ -54,6 +55,7 @@ package modules.gmap.mediator _view.map.enableContinuousZoom(); _view.map.addControl(new ZoomControl()); _view.map.setZoom(2); + _view.map.setDoubleClickMode(MapAction.ACTION_NOTHING); if (!_view.map.isLoaded()) { diff --git a/uifx/src/modules/gmap/view/controls/GMapLinkControl.as b/uifx/src/modules/gmap/view/controls/GMapLinkControl.as index 3034529..2e63d0b 100644 --- a/uifx/src/modules/gmap/view/controls/GMapLinkControl.as +++ b/uifx/src/modules/gmap/view/controls/GMapLinkControl.as @@ -27,6 +27,9 @@ package modules.gmap.view.controls import com.google.maps.overlays.PolylineOptions; import com.google.maps.styles.StrokeStyle; + import flash.events.TimerEvent; + import flash.utils.Timer; + import modules.gmap.domain.Link; import mx.core.UIComponent; @@ -35,11 +38,15 @@ package modules.gmap.view.controls { private var _map : Map; private var _link : Link; - private var _line : Polyline; + private var _line : Polyline; + private var _timer : Timer; public function GMapLinkControl() { super(); + + _timer = new Timer(250, 1); + _timer.addEventListener(TimerEvent.TIMER, onTimer); } public function get map():Map @@ -69,6 +76,13 @@ package modules.gmap.view.controls if(_link !== value) _link = value; + //give the user chanse to performe a doubleclick + //then display the selection link + _timer.start(); + } + + private function onTimer(event : TimerEvent) : void + { reinitLine(); } ------------------------------------------------------------------------------ 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
