Updated lang.en.js file and added fixes to issues 346 and 347 to trunk

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1000 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Alexis Deveria 2009-12-07 15:42:36 +00:00
parent 59c4f0c739
commit bf1cd8606d
2 changed files with 15 additions and 10 deletions

View File

@ -28,13 +28,9 @@
{"id":"align_relative_to","title":"Align relative to ..."},
{"id":"tool_group","title":"Group Elements [G]"},
{"id":"tool_ungroup","title":"Ungroup Elements [G]"},
{"id":"rect_x","title":"Change rectangle X coordinate"},
{"id":"rect_y","title":"Change rectangle Y coordinate"},
{"id":"rect_width","title":"Change rectangle width"},
{"id":"rect_height","title":"Change rectangle height"},
{"id":"rect_rx","title":"Change Rectangle Corner Radius"},
{"id":"image_x","title":"Change image X coordinate"},
{"id":"image_y","title":"Change image Y coordinate"},
{"id":"image_width","title":"Change image width"},
{"id":"image_height","title":"Change image height"},
{"id":"image_url","title":"Change URL"},
@ -49,8 +45,6 @@
{"id":"line_y1","title":"Change line's starting y coordinate"},
{"id":"line_x2","title":"Change line's ending x coordinate"},
{"id":"line_y2","title":"Change line's ending y coordinate"},
{"id":"text_x","title":"Change text X coordinate"},
{"id":"text_y","title":"Change text Y coordinate"},
{"id":"tool_bold","title":"Bold Text [B]"},
{"id":"tool_italic","title":"Italic Text [I]"},
{"id":"font_family","title":"Change Font Family"},
@ -139,6 +133,11 @@
{"id":"icon_medium","textContent":"Medium"},
{"id":"icon_large","textContent":"Large"},
{"id":"icon_xlarge","textContent":"Extra Large"},
{"id":"selected_x","title":"Change X coordinate"},
{"id":"selected_y","title":"Change Y coordinate"},
{"id":"tool_topath","title":"Convert to Path"},
{"id":"tool_reorient","title":"Reorient path"},
{"id":"tool_node_link","title":"Link Control Points"},
{"js_strings": {
"invalidAttrValGiven":"Invalid value given",
"noContentToFitTo":"No content to fit to",

View File

@ -197,15 +197,20 @@ function svg_edit_setup() {
// called when any element has changed
var elementChanged = function(window,elems) {
// selectedElement must be updated here in case it was changed
selectedElement = (elems.length == 1 || elems[1] == null ? elems[0] : null);
for (var i = 0; i < elems.length; ++i) {
var elem = elems[i];
// if the element changed was the svg, then it could be a resolution change
if (elem && elem.tagName == "svg" && elem.getAttribute("viewBox")) {
var vb = elem.getAttribute("viewBox").split(' ');
changeResolution(parseInt(vb[2]),
parseInt(vb[3]));
}
// Update selectedElement if element is no longer part of the image.
// This occurs for the text elements in Firefox
else if(elem && selectedElement && selectedElement.parentNode == null) {
selectedElement = elem;
}
}
@ -340,8 +345,9 @@ function svg_edit_setup() {
var updateContextPanel = function() {
var elem = selectedElement;
var currentLayer = svgCanvas.getCurrentLayer();
var currentMode = svgCanvas.getMode();
// No need to update anything else in rotate mode
if (svgCanvas.getMode() == 'rotate' && elem != null) {
if (currentMode == 'rotate' && elem != null) {
$('#angle').val(svgCanvas.getRotationAngle(elem));
return;
} else if(svgCanvas.addedNew && elem != null && elname == 'image') {
@ -356,7 +362,7 @@ function svg_edit_setup() {
var angle = svgCanvas.getRotationAngle(elem);
$('#angle').val(angle);
if(!is_node) {
if(!is_node && currentMode != 'pathedit') {
$('#selected_panel').show();
// Elements in this array already have coord fields
if($.inArray(elname, ['line', 'circle', 'ellipse']) != -1) {