Module: nagvis Branch: master Commit: 8f485aa3833472d2ac68d620e2e908848d6d5e5e URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis/commit/?id=8f485aa3833472d2ac68d620e2e908848d6d5e5e
Author: Roman Kyrylych <[email protected]> Date: Mon Aug 31 16:59:57 2009 +0300 gmap: Added a workaround for mousewheel zooming when wmode=opaque Signed-off-by: Roman Kyrylych <[email protected]> --- uifx/src/modules/gmap/GMapModule.mxml | 38 +++++++++++++++++++++++++++++++++ 1 files changed, 38 insertions(+), 0 deletions(-) diff --git a/uifx/src/modules/gmap/GMapModule.mxml b/uifx/src/modules/gmap/GMapModule.mxml index dc3d887..0230bb9 100644 --- a/uifx/src/modules/gmap/GMapModule.mxml +++ b/uifx/src/modules/gmap/GMapModule.mxml @@ -35,6 +35,44 @@ <mate:LinksEM/> <mate:NagiosEM/> + <mx:Script> + <![CDATA[ + import mx.core.Application; + + ExternalInterface.addCallback("handleWheel", function(event : Object) : void + { + var obj : InteractiveObject = null; + var objects : Array = Application.application.getObjectsUnderPoint(new Point(event.x, event.y)); + + for (var i : int = objects.length - 1; i >= 0; i--) + { + if (objects[i] is InteractiveObject) + { + obj = objects[i] as InteractiveObject; + break; + } + else + { + if (objects[i] is Shape && (objects[i] as Shape).parent) + { + obj = (objects[i] as Shape).parent; + break; + } + } + } + + if (obj) + { + var mEvent : MouseEvent = new MouseEvent(MouseEvent.MOUSE_WHEEL, true, false, + event.x, event.y, obj, + event.ctrlKey, event.altKey, event.shiftKey, + false, -Number(event.delta)); + + obj.dispatchEvent(mEvent); + } + }); + ]]> + </mx:Script> <mx:Style source="css/Main.css" /> <view:MainView width="100%" height="100%"/> ------------------------------------------------------------------------------ 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
