[mapguide-commits] r4443 - in trunk/MgDev/Web/src: localized
viewerfiles
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Wed Dec 16 01:20:07 EST 2009
Author: christinebao
Date: 2009-12-16 01:20:06 -0500 (Wed, 16 Dec 2009)
New Revision: 4443
Modified:
trunk/MgDev/Web/src/localized/en
trunk/MgDev/Web/src/viewerfiles/ajaxmappane.templ
trunk/MgDev/Web/src/viewerfiles/browserdetect.js
Log:
Fixed Ticket https://trac.osgeo.org/mapguide/ticket/1161 (Submit code on behalf of Arthur Liu.)
Safari: Ajax activates URL by CTRL + CLICK but tooltips shows SHIFT+CLICK
[Analysis]
Ctrl + Click is used for context menu on Mac, and Shift + Click is designed for multiple selection in MapGuide, so a new modifier key is needed for opening URL and End selection on Mac.
[Resolution]
Command key was born for this mission.
Modified: trunk/MgDev/Web/src/localized/en
===================================================================
--- trunk/MgDev/Web/src/localized/en 2009-12-16 05:41:48 UTC (rev 4442)
+++ trunk/MgDev/Web/src/localized/en 2009-12-16 06:20:06 UTC (rev 4443)
@@ -219,11 +219,11 @@
VIEWERMOVESLIDER = Drag to move slider
VIEWERDRAGZOOM = Drag to zoom
ENDSEL = CTRL + click to end
-ENDSELSAFARI = SHIFT + click to end
+ENDSELMAC = COMMAND + click to end
DECIMALSEPARATOR = .
THOUSANDSEPARATOR = ,
OPENHYPERLINK = CTRL + click to open link
-OPENHYPERLINKSAFARI = SHIFT + click to open link
+OPENHYPERLINKMAC = COMMAND + click to open link
# Main Frame
NEEDLOGIN = You must enter a valid login ID and password to access this site
Modified: trunk/MgDev/Web/src/viewerfiles/ajaxmappane.templ
===================================================================
--- trunk/MgDev/Web/src/viewerfiles/ajaxmappane.templ 2009-12-16 05:41:48 UTC (rev 4442)
+++ trunk/MgDev/Web/src/viewerfiles/ajaxmappane.templ 2009-12-16 06:20:06 UTC (rev 4443)
@@ -322,7 +322,7 @@
var slidercourse = 78;
var slidertop = 44;
var showSlider=%s;
-var selTtipText = safari ? "__#ENDSELSAFARI#__" : "__#ENDSEL#__";
+var selTtipText = macOS ? "__#ENDSELMAC#__" : "__#ENDSEL#__";
var curimg = "mapImage1";
var curSelImg = "selImage1";
var ovimgloaded = false;
@@ -331,7 +331,7 @@
var digitizing = false;
var cancelTgt;
var locale = '%s';
-var openHlinkText = safari ? "__#OPENHYPERLINKSAFARI#__" : "__#OPENHYPERLINK#__";
+var openHlinkText = macOS ? "__#OPENHYPERLINKMAC#__" : "__#OPENHYPERLINK#__";
var selectionColor = '0x0000FFFF'; // Blue
var lastLegendScaleUpdate = curScale;
%s
@@ -894,7 +894,9 @@
if(!processed)
{
HideHyperlinkTip();
- if(tool != 6 && e.ctrlKey)
+
+ // Ctrl + Click to open URL except MacOS, which using Command + Click
+ if(tool != 6 && ((e.ctrlKey && !macOS) || (e.metaKey && macOS )))
{
if(hlData.url != "")
ExecuteHyperlink(hlData.url);
@@ -925,7 +927,11 @@
StartToolFeedback(x, y, CIRCLE);
break;
case 6:
- if(!e.ctrlKey)
+ if((e.ctrlKey && !macOS) || (e.metaKey && macOS))
+ {
+ EndPolygonSelection(x, y);
+ }
+ else
{
if(polySel.xs.length == 0)
StartToolFeedback(x, y, POLY);
@@ -937,9 +943,6 @@
ToolFeedback(x, y);
}
}
- else
- EndPolygonSelection(x, y);
-
break;
}
}
@@ -962,11 +965,6 @@
InformationContextMenu(x,y);
else
{
- if(safari && tool == 6)
- {
- EndPolygonSelection(x - mapPosX, y);
- return false;
- }
if(parent.IsContextMenu())
ContextMenu(x, y);
}
Modified: trunk/MgDev/Web/src/viewerfiles/browserdetect.js
===================================================================
--- trunk/MgDev/Web/src/viewerfiles/browserdetect.js 2009-12-16 05:41:48 UTC (rev 4442)
+++ trunk/MgDev/Web/src/viewerfiles/browserdetect.js 2009-12-16 06:20:06 UTC (rev 4443)
@@ -7,6 +7,9 @@
var safari1or2 = false;
var safari3plus = false;
var safari = false;
+
+var macOS = navigator.appVersion.indexOf("Mac")!=-1;
+
if(!chrome && safariIndex != -1)
{
safari = true;
More information about the mapguide-commits
mailing list