diff --git a/editor/svg-editor.css b/editor/svg-editor.css
index 28e5896a..13fc7955 100644
--- a/editor/svg-editor.css
+++ b/editor/svg-editor.css
@@ -102,6 +102,18 @@
display: none;
}
+#svg_editor #circle_panel {
+ display: none;
+}
+
+#svg_editor #ellipse_panel {
+ display: none;
+}
+
+#svg_editor #line_panel {
+ display: none;
+}
+
#svg_editor #text_panel {
display: none;
}
@@ -114,6 +126,18 @@
vertical-align:12px;
}
+#svg_editor #circle_panel .circle_tool {
+ vertical-align:12px;
+}
+
+#svg_editor #ellipse_panel .ellipse_tool {
+ vertical-align:12px;
+}
+
+#svg_editor #line_panel .line_tool {
+ vertical-align:12px;
+}
+
#svg_editor .tool_button, #svg_editor .tool_button_current, #svg_editor .tool_button_disabled {
height: 24px;
width: 24px;
diff --git a/editor/svg-editor.html b/editor/svg-editor.html
index e9b2dda3..ed645aaa 100644
--- a/editor/svg-editor.html
+++ b/editor/svg-editor.html
@@ -43,7 +43,6 @@
-
diff --git a/editor/svg-editor.js b/editor/svg-editor.js
index 09fa1cf8..7cc20221 100644
--- a/editor/svg-editor.js
+++ b/editor/svg-editor.js
@@ -80,19 +80,42 @@ function svg_edit_setup() {
var elem = selectedElement;
$('#selected_panel').hide();
$('#rect_panel').hide();
+ $('#circle_panel').hide();
+ $('#ellipse_panel').hide();
+ $('#line_panel').hide();
$('#text_panel').hide();
if (elem != null) {
$('#selected_panel').show();
// update contextual tools here
switch(elem.tagName) {
case "rect":
- $('#rect_panel').show().css("display", "inline");
+ $('#rect_panel').show();
$('#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 "circle":
+ $('#circle_panel').show();
+ $('#circle_cx').val(elem.getAttribute("cx")||0);
+ $('#circle_cy').val(elem.getAttribute("cy")||0);
+ $('#circle_r').val(elem.getAttribute("r")||0);
+ break;
+ case "ellipse":
+ $('#ellipse_panel').show();
+ $('#ellipse_cx').val(elem.getAttribute("cx")||0);
+ $('#ellipse_cy').val(elem.getAttribute("cy")||0);
+ $('#ellipse_rx').val(elem.getAttribute("rx")||0);
+ $('#ellipse_ry').val(elem.getAttribute("ry")||0);
+ break;
+ case "line":
+ $('#line_panel').show();
+ $('#line_x1').val(elem.getAttribute("x1")||0);
+ $('#line_y1').val(elem.getAttribute("y1")||0);
+ $('#line_x2').val(elem.getAttribute("x2")||0);
+ $('#line_y2').val(elem.getAttribute("y2")||0);
+ break;
case "text":
// jquery's show() always sets display to block
$('#text_panel').show().css("display", "inline");
diff --git a/wave/svg-edit.xml b/wave/svg-edit.xml
index 3bd4e5f9..b83c3689 100644
--- a/wave/svg-edit.xml
+++ b/wave/svg-edit.xml
@@ -47,7 +47,6 @@
-