Fixed bug where selection box wasn't shown on node-selectio

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1815 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Alexis Deveria 2010-10-25 16:54:16 +00:00
parent 798704a715
commit 1ff4caa1c6
1 changed files with 9 additions and 8 deletions

View File

@ -1643,7 +1643,7 @@ var SelectorManager;
// Function: SelectorManager.getRubberBandBox
// Returns the rubberBandBox DOM element. This is the rectangle drawn by the user for selecting/zooming
this.getRubberBandBox = function() {
if (this.rubberBandBox == null) {
if (!this.rubberBandBox) {
this.rubberBandBox = this.selectorParentGroup.appendChild(
addSvgElementFromJson({ "element": "rect",
"attr": {
@ -5193,15 +5193,16 @@ var getMouseTarget = this.getMouseTarget = function(evt) {
x=xya.x; y=xya.y;
}
if(rubberBox && rubberBox.getAttribute('display') != 'none') {
if(rubberBox && rubberBox.getAttribute('display') !== 'none') {
real_x *= current_zoom;
real_y *= current_zoom;
assignAttributes(rubberBox, {
'x': Math.min(r_start_x, real_x),
'y': Math.min(r_start_y, real_y),
'width': Math.abs(real_x - r_start_x),
'height': Math.abs(real_y - r_start_y)
},100);
'x': Math.min(r_start_x*current_zoom, real_x),
'y': Math.min(r_start_y*current_zoom, real_y),
'width': Math.abs(real_x - r_start_x*current_zoom),
'height': Math.abs(real_y - r_start_y*current_zoom)
},100);
}
pathActions.mouseMove(x, y);
break;