Add in x,y,w,h contextual controls for rects (updated by not editable)

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@183 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Jeff Schiller 2009-06-23 17:30:30 +00:00
parent 9b312d694f
commit 61a1259efa
2 changed files with 12 additions and 0 deletions

View File

@ -59,6 +59,14 @@
<option value="15">15</option>
<option value="20">20</option>
</select>
<label class="rect_tool">X:</label>
<input id="rect_x" class="rect_tool" title="Change rectangle X coordinate" alt="X" size="5" disabled/>
<label class="rect_tool">Y:</label>
<input id="rect_y" class="rect_tool" title="Change rectangle Y coordinate" alt="Y" size="5" disabled/>
<label class="rect_tool">W:</label>
<input id="rect_w" class="rect_tool" title="Change rectangle width" alt="width" size="5" disabled/>
<label class="rect_tool">H:</label>
<input id="rect_h" class="rect_tool" title="Change rectangle height" alt="height" size="5" disabled/>
</div>
<!-- TODO: add a circle_panel, ellipse_panel, line_panel -->

View File

@ -99,6 +99,10 @@ function svg_edit_setup() {
case "rect":
$('#rect_panel').show().css("display", "inline");
$('#rect_radius').val(elem.getAttribute("rx")||0);
$('#rect_x').val(elem.getAttribute("x")||0);
$('#rect_y').val(elem.getAttribute("y")||0);
$('#rect_w').val(elem.getAttribute("width")||0);
$('#rect_h').val(elem.getAttribute("height")||0);
break;
case "text":
// jquery's show() always sets display to block