[mapguide-commits] r1097 - trunk/MgDev/Web/src/viewerfiles

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Thu Feb 8 18:29:15 EST 2007


Author: chrisclaydon
Date: 2007-02-08 18:29:08 -0500 (Thu, 08 Feb 2007)
New Revision: 1097

Modified:
   trunk/MgDev/Web/src/viewerfiles/ajaxmappane.templ
   trunk/MgDev/Web/src/viewerfiles/dwfmappane.templ
Log:
Add double-click handlers to DWF Viewer and AJAX Viewer to allow users to add their own functionality for these events.

Modified: trunk/MgDev/Web/src/viewerfiles/ajaxmappane.templ
===================================================================
--- trunk/MgDev/Web/src/viewerfiles/ajaxmappane.templ	2007-02-08 22:43:38 UTC (rev 1096)
+++ trunk/MgDev/Web/src/viewerfiles/ajaxmappane.templ	2007-02-08 23:29:08 UTC (rev 1097)
@@ -725,6 +725,12 @@
     return true;
 }
 
+function OnDblClick(e)
+{
+    // Implement your own double-click handler here
+    // Call e.stopPropagation() if the event has been handled
+}
+
 function OnMouseDown(e)
 {
     if(!PopupMouseDown(e))
@@ -3356,7 +3362,7 @@
 </head>
 <body id="body" onload="InitDocument()" leftmargin=0 topmargin=0 rightmargin=0 bottommargin=0 marginwidth=0 marginheight=0 bgcolor=#d0d0d0
         onmousedown="return OnMouseDown(event)" onmousemove="return OnMouseMove(event)" onmouseup="OnMouseUp(event)"
-        oncontextmenu = "return OnContextMenu(event)" onclick="return OnClick(event)">
+        oncontextmenu = "return OnContextMenu(event)" onclick="return OnClick(event)" ondblclick="return OnDblClick(event)">
     <table id="tbMap" width="100%%" height="100%%" cellpadding="0" cellspacing="0" id="tb">
       <tr>
        <td id="InfoBand" align="left" valign="top" width="1" bgcolor="white">

Modified: trunk/MgDev/Web/src/viewerfiles/dwfmappane.templ
===================================================================
--- trunk/MgDev/Web/src/viewerfiles/dwfmappane.templ	2007-02-08 22:43:38 UTC (rev 1096)
+++ trunk/MgDev/Web/src/viewerfiles/dwfmappane.templ	2007-02-08 23:29:08 UTC (rev 1097)
@@ -485,6 +485,14 @@
     hidePopup(tbMenu);
     hidePopup(ctxMenu);
 }
+  
+function OnDblClick(x, y)
+{
+    // Implement your own double-click handler here
+    // Return true if the event has been handled
+    
+    return false;
+}
 
 function Print(layouts, title)
 {
@@ -551,6 +559,13 @@
         handled.State = true;
 </script>
 
+<script language="javascript" for="DWFViewer" event="OnLButtonDblClick(x, y, handled)">
+    if(OnDblClick(x, y))
+    {
+        handled.State = true;
+    }
+</script>
+
 <script language="javascript" for="DWFViewer" event="OnKeyDown(key, handled)">
     if(key == 27 && digitizing)
         digitizing = false;



More information about the mapguide-commits mailing list