[fusion-commits] r2286 - branches/fusion-2.2/widgets
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Tue Nov 23 22:17:30 EST 2010
Author: hubu
Date: 2010-11-23 19:17:30 -0800 (Tue, 23 Nov 2010)
New Revision: 2286
Modified:
branches/fusion-2.2/widgets/Pan.js
branches/fusion-2.2/widgets/Zoom.js
Log:
Fix Ticket #415: https://trac.osgeo.org/fusion/ticket/415
The mouse cursor is incorrect for pan and zoomRectangle in Safari 5 and Chrome 5.
Modified: branches/fusion-2.2/widgets/Pan.js
===================================================================
--- branches/fusion-2.2/widgets/Pan.js 2010-11-23 20:04:02 UTC (rev 2285)
+++ branches/fusion-2.2/widgets/Pan.js 2010-11-24 03:17:30 UTC (rev 2286)
@@ -36,9 +36,15 @@
this.control = new OpenLayers.Control.DragPan();
this.getMap().oMapOL.addControl(this.control);
this.control.handler.keyMask = 0;
+ var index = window.location.href.indexOf("?");
+ var mainpath = window.location.href.substring(0,index);
+ index = mainpath.lastIndexOf("/");
+ mainpath = mainpath.substring(0,index+1);
+ var grabpath= "url(" + mainpath + "images/grab.cur" + "), move";
+ var grabbingpath = "url(" + mainpath + "images/grabbing.cur" + "), move";
- this.cursorNormal = ["url('images/grab.cur'),move", 'grab', '-moz-grab', 'move'];
- this.cursorDrag = ["url('images/grabbing.cur'),move", 'grabbing', '-moz-grabbing', 'move'];
+ this.cursorNormal = [grabpath, 'grab', '-moz-grab', 'move'];
+ this.cursorDrag = [grabbingpath, 'grabbing', '-moz-grabbing', 'move'];
},
activate : function() {
Modified: branches/fusion-2.2/widgets/Zoom.js
===================================================================
--- branches/fusion-2.2/widgets/Zoom.js 2010-11-23 20:04:02 UTC (rev 2285)
+++ branches/fusion-2.2/widgets/Zoom.js 2010-11-24 03:17:30 UTC (rev 2286)
@@ -38,9 +38,15 @@
uiClass: Jx.Button,
initializeWidget: function(widgetTag){
- this.asCursor = ["url('images/zoomin.cur'),auto",'-moz-zoom-in', 'auto'];
- this.zoomInCursor = ["url('images/zoomin.cur'),auto",'-moz-zoom-in', 'auto'];
- this.zoomOutCursor = ["url('images/zoomout.cur'),auto",'-moz-zoom-out', 'auto'];
+ var index = window.location.href.indexOf("?");
+ var mainpath = window.location.href.substring(0,index);
+ index = mainpath.lastIndexOf("/");
+ mainpath = mainpath.substring(0,index+1);
+ var asCursorString= "url(" + mainpath + "images/zoomin.cur" + "), auto";
+ var zoomOutCursorString = "url(" + mainpath + "images/zoomout.cur" + "), auto";
+ this.asCursor = [asCursorString,'-moz-zoom-in', 'auto'];
+ this.zoomInCursor = [asCursorString,'-moz-zoom-in', 'auto'];
+ this.zoomOutCursor = [zoomOutCursorString,'-moz-zoom-out', 'auto'];
var json = widgetTag.extension;
this.tolerance = json.Tolerance ? json.Tolerance[0] : this.tolerance;
More information about the fusion-commits
mailing list