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-75d572ba1dddmaster
parent
9b312d694f
commit
61a1259efa
|
@ -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 -->
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue