Fixed some selection related bugs
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1751 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
@@ -1853,10 +1853,6 @@
|
||||
$('#styleoverrides').text('');
|
||||
$('.tool_button_current').removeClass('tool_button_current').addClass('tool_button');
|
||||
$(button).addClass('tool_button_current').removeClass('tool_button');
|
||||
// when a tool is selected, we should deselect any currently selected elements
|
||||
if(button !== '#tool_select') {
|
||||
svgCanvas.clearSelection();
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
@@ -2273,13 +2269,15 @@
|
||||
};
|
||||
|
||||
var clickText = function(){
|
||||
toolButtonClick('#tool_text');
|
||||
svgCanvas.setMode('text');
|
||||
if (toolButtonClick('#tool_text')) {
|
||||
svgCanvas.setMode('text');
|
||||
}
|
||||
};
|
||||
|
||||
var clickPath = function(){
|
||||
toolButtonClick('#tool_path');
|
||||
svgCanvas.setMode('path');
|
||||
if (toolButtonClick('#tool_path')) {
|
||||
svgCanvas.setMode('path');
|
||||
}
|
||||
};
|
||||
|
||||
// Delete is a contextual tool that only appears in the ribbon if
|
||||
|
||||
@@ -5342,9 +5342,6 @@ var getMouseTarget = this.getMouseTarget = function(evt) {
|
||||
cleanupElement(element);
|
||||
if(current_mode == "path") {
|
||||
pathActions.toEditMode(element);
|
||||
} else if (current_mode == "text" || current_mode == "image" || current_mode == "foreignObject") {
|
||||
// keep us in the tool we were in unless it was a text or image element
|
||||
addToSelection([element], true);
|
||||
} else {
|
||||
selectOnly([element], true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user