Fixed issue 149: Make the object navigation start at the first object when the last one is reached

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@507 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Alexis Deveria 2009-08-31 17:03:33 +00:00
parent ee2e10565d
commit 402187cba4
1 changed files with 7 additions and 7 deletions

View File

@ -2835,13 +2835,13 @@ function SvgCanvas(c)
while(i--) {
if(all_elems[i] == cur_elem) {
var num = next?i-1:i+1;
if(num >= all_elems.length || num < 0) {
elem = cur_elem;
break;
} else {
elem = all_elems[num];
break;
}
if(num >= all_elems.length) {
num = 0;
} else if(num < 0) {
num = all_elems.length-1;
}
elem = all_elems[num];
break;
}
}
}