Permalink
Browse files

Fixing boxselector right-click fail.

  • Loading branch information...
1 parent 29e7e20 commit 418dea64e62b0009f389fb203feefb1f02c88d42 @tmcw tmcw committed May 27, 2011
Showing with 7 additions and 27 deletions.
  1. +3 −14 build/wax.mm.js
  2. +1 −1 build/wax.mm.min.js
  3. +3 −12 control/mm/boxselector.js
View
@@ -595,23 +595,16 @@ wax.boxselector = function(map, opts) {
var boxselector = {
add: function(map) {
- this.containerDiv = document.createElement('div');
- this.containerDiv.id = map.parent.id + '-zoombox';
- this.containerDiv.className = 'boxselector-box-container';
- this.containerDiv.style.width = map.dimensions.x + 'px';
- this.containerDiv.style.height = map.dimensions.y + 'px';
-
this.boxDiv = document.createElement('div');
this.boxDiv.id = map.parent.id + '-boxselector-box';
this.boxDiv.className = 'boxselector-box';
- this.containerDiv.appendChild(this.boxDiv);
- map.parent.appendChild(this.containerDiv);
+ map.parent.appendChild(this.boxDiv);
- com.modestmaps.addEvent(this.containerDiv, 'mousedown', this.mouseDown());
+ com.modestmaps.addEvent(map.parent, 'mousedown', this.mouseDown());
map.addCallback('drawn', this.drawbox());
},
remove: function() {
- this.containerDiv.parentNode.removeChild(this.containerDiv);
+ map.parent.removeChild(this.boxDiv);
map.removeCallback('mousedown', this.drawbox());
},
getMousePoint: function(e) {
@@ -689,8 +682,6 @@ wax.boxselector = function(map, opts) {
com.modestmaps.removeEvent(map.parent, 'mouseup', this.mouseUp());
map.parent.style.cursor = 'auto';
-
- return com.modestmaps.cancelEvent(e);
}, this);
return this._mouseUp;
},
@@ -1485,8 +1476,6 @@ wax.zoombox = function(map, opts) {
com.modestmaps.removeEvent(map.parent, 'mouseup', this.mouseUp());
map.parent.style.cursor = 'auto';
-
- // return com.modestmaps.cancelEvent(e);
}, this);
return this._mouseUp;
}
Oops, something went wrong.

0 comments on commit 418dea6

Please sign in to comment.