Update radius pulldown with value of selected rectangle's corner radius
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@181 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
@@ -46,9 +46,9 @@
|
||||
<!-- TODO: also add x, y, width, height -->
|
||||
<div id="rect_panel">
|
||||
<img class="tool_sep" src="images/sep.png" alt="|"/>
|
||||
<label class="rect_tool" >Radius:</label>
|
||||
<label class="rect_tool">Radius:</label>
|
||||
<!-- TODO: turn this into a spinner control! -->
|
||||
<select id="rect_radius" class="rect_tool" title="Change Rectangle Corner Radius" alt="Corner Radius">
|
||||
<select id="rect_radius" class="rect_tool" title="Change rectangle corner radius" alt="Corner Radius">
|
||||
<option selected="selected" value="0">0</option>
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
|
||||
@@ -98,6 +98,9 @@ function svg_edit_setup() {
|
||||
switch(elem.tagName) {
|
||||
case "rect":
|
||||
$('#rect_panel').show().css("display", "inline");
|
||||
var rad = elem.getAttribute("rx");
|
||||
if (!rad) { rad = "0"; }
|
||||
$('#rect_radius').val(rad);
|
||||
break;
|
||||
case "text":
|
||||
// jquery's show() always sets display to block
|
||||
|
||||
Reference in New Issue
Block a user