Last round of left click checks added following r769 and r770.
git-svn-id: http://svn.openlayers.org/branches/openlayers/1.0@771 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -111,6 +111,7 @@ OpenLayers.Control.PanZoom.prototype =
|
|||||||
* @param {event} evt
|
* @param {event} evt
|
||||||
*/
|
*/
|
||||||
buttonDown: function (evt) {
|
buttonDown: function (evt) {
|
||||||
|
if (!Event.isLeftClick(evt)) return;
|
||||||
|
|
||||||
var slide = this.map.getResolution() * this.slideFactor;
|
var slide = this.map.getResolution() * this.slideFactor;
|
||||||
var center = this.map.getCenter();
|
var center = this.map.getCenter();
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ OpenLayers.Control.PanZoomBar.prototype =
|
|||||||
* and sets the zoom level appropriately.
|
* and sets the zoom level appropriately.
|
||||||
*/
|
*/
|
||||||
divClick: function (evt) {
|
divClick: function (evt) {
|
||||||
|
if (!Event.isLeftClick(evt)) return;
|
||||||
var y = evt.xy.y;
|
var y = evt.xy.y;
|
||||||
var top = Position.page(evt.object)[1];
|
var top = Position.page(evt.object)[1];
|
||||||
var levels = Math.floor((y - top)/this.zoomStopHeight);
|
var levels = Math.floor((y - top)/this.zoomStopHeight);
|
||||||
@@ -139,6 +140,7 @@ OpenLayers.Control.PanZoomBar.prototype =
|
|||||||
* event listener for clicks on the slider
|
* event listener for clicks on the slider
|
||||||
*/
|
*/
|
||||||
zoomBarDown:function(evt) {
|
zoomBarDown:function(evt) {
|
||||||
|
if (!Event.isLeftClick(evt)) return;
|
||||||
this.map.events.register("mousemove", this, this.passEventToSlider);
|
this.map.events.register("mousemove", this, this.passEventToSlider);
|
||||||
this.map.events.register("mouseup", this, this.passEventToSlider);
|
this.map.events.register("mouseup", this, this.passEventToSlider);
|
||||||
this.mouseDragStart = evt.xy.copyOf();
|
this.mouseDragStart = evt.xy.copyOf();
|
||||||
@@ -173,6 +175,7 @@ OpenLayers.Control.PanZoomBar.prototype =
|
|||||||
* and switch to it.
|
* and switch to it.
|
||||||
*/
|
*/
|
||||||
zoomBarUp:function(evt) {
|
zoomBarUp:function(evt) {
|
||||||
|
if (!Event.isLeftClick(evt)) return;
|
||||||
if (this.zoomStart) {
|
if (this.zoomStart) {
|
||||||
this.div.style.cursor="default";
|
this.div.style.cursor="default";
|
||||||
this.map.events.remove("mousemove");
|
this.map.events.remove("mousemove");
|
||||||
|
|||||||
Reference in New Issue
Block a user