Fix Bug 80: add text controls for x,y (merge Alexis' patch)

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@371 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
Jeff Schiller
2009-08-13 15:42:41 +00:00
parent 794db6ba98
commit 83275046b4
4 changed files with 16 additions and 2 deletions

View File

@@ -190,6 +190,8 @@ function svg_edit_setup() {
case "text":
// jquery's show() always sets display to block
$('#text_panel').show().css("display", "inline");
$('#text_x').val(elem.getAttribute("x")||0);
$('#text_y').val(elem.getAttribute("y")||0);
if (svgCanvas.getItalic()) {
$('#tool_italic').addClass('tool_button_current');
}
@@ -205,8 +207,8 @@ function svg_edit_setup() {
$('#font_family').val(elem.getAttribute("font-family"));
$('#font_size').val(elem.getAttribute("font-size"));
$('#text').val(elem.textContent);
$('#text').focus();
if (shouldHighlightText) {
$('#text').focus();
$('#text').select();
}
break;