diff --git a/editor/images/align-vertical-bottom.png b/editor/images/align-bottom.png
similarity index 100%
rename from editor/images/align-vertical-bottom.png
rename to editor/images/align-bottom.png
diff --git a/editor/images/align-horizontal-center.png b/editor/images/align-center.png
similarity index 100%
rename from editor/images/align-horizontal-center.png
rename to editor/images/align-center.png
diff --git a/editor/images/align-horizontal-left.png b/editor/images/align-left.png
similarity index 100%
rename from editor/images/align-horizontal-left.png
rename to editor/images/align-left.png
diff --git a/editor/images/align-vertical-center.png b/editor/images/align-middle.png
similarity index 100%
rename from editor/images/align-vertical-center.png
rename to editor/images/align-middle.png
diff --git a/editor/images/align-horizontal-right.png b/editor/images/align-right.png
similarity index 100%
rename from editor/images/align-horizontal-right.png
rename to editor/images/align-right.png
diff --git a/editor/images/align-vertical-top.png b/editor/images/align-top.png
similarity index 100%
rename from editor/images/align-vertical-top.png
rename to editor/images/align-top.png
diff --git a/editor/images/clone.png b/editor/images/clone.png
new file mode 100644
index 00000000..c8713c80
Binary files /dev/null and b/editor/images/clone.png differ
diff --git a/editor/svg-editor.html b/editor/svg-editor.html
index 4a750ef8..be5dbd80 100644
--- a/editor/svg-editor.html
+++ b/editor/svg-editor.html
@@ -53,13 +53,15 @@
-
+
-
+
diff --git a/editor/svg-editor.js b/editor/svg-editor.js
index 6f3ce2c8..2a7d9b95 100644
--- a/editor/svg-editor.js
+++ b/editor/svg-editor.js
@@ -475,6 +475,25 @@ function svg_edit_setup() {
svgCanvas.cloneSelectedElements();
};
+ var clickAlignLeft = function(){
+ svgCanvas.alignSelectedElements('l');
+ };
+ var clickAlignCenter = function(){
+ svgCanvas.alignSelectedElements('c');
+ };
+ var clickAlignRight = function(){
+ svgCanvas.alignSelectedElements('r');
+ };
+ var clickAlignTop = function(){
+ svgCanvas.alignSelectedElements('t');
+ };
+ var clickAlignMiddle = function(){
+ svgCanvas.alignSelectedElements('m');
+ };
+ var clickAlignBottom = function(){
+ svgCanvas.alignSelectedElements('b');
+ };
+
var showSourceEditor = function(){
if (editingsource) return;
editingsource = true;
@@ -533,6 +552,12 @@ function svg_edit_setup() {
$('#tool_redo').click(clickRedo);
$('#tool_clone').click(clickClone);
$('#tool_clone_multi').click(clickClone);
+ $('#tool_alignleft').click(clickAlignLeft);
+ $('#tool_aligncenter').click(clickAlignCenter);
+ $('#tool_alignright').click(clickAlignRight);
+ $('#tool_aligntop').click(clickAlignTop);
+ $('#tool_alignmiddle').click(clickAlignMiddle);
+ $('#tool_alignbottom').click(clickAlignBottom);
// these two lines are required to make Opera work properly with the flyout mechanism
$('#tools_rect_show').click(clickSquare);
$('#tools_ellipse_show').click(clickCircle);
@@ -565,12 +590,12 @@ function svg_edit_setup() {
$('#tool_paste').mousedown(function(){$('#tool_paste').addClass('tool_button_current');});
$('#tool_paste').mouseup(function(){$('#tool_paste').removeClass('tool_button_current');});
$('#tool_paste').mouseout(function(){$('#tool_paste').removeClass('tool_button_current');});
- $('#tool_copy').mousedown(function(){$('#tool_copy').addClass('tool_button_current');});
- $('#tool_copy').mouseup(function(){$('#tool_copy').removeClass('tool_button_current');});
- $('#tool_copy').mouseout(function(){$('#tool_copy').removeClass('tool_button_current');});
- $('#tool_copy_multi').mousedown(function(){$('#tool_copy').addClass('tool_button_current');});
- $('#tool_copy_multi').mouseup(function(){$('#tool_copy').removeClass('tool_button_current');});
- $('#tool_copy_multi').mouseout(function(){$('#tool_copy').removeClass('tool_button_current');});
+ $('#tool_clone').mousedown(function(){$('#tool_clone').addClass('tool_button_current');});
+ $('#tool_clone').mouseup(function(){$('#tool_clone').removeClass('tool_button_current');});
+ $('#tool_clone').mouseout(function(){$('#tool_clone').removeClass('tool_button_current');});
+ $('#tool_clone_multi').mousedown(function(){$('#tool_clone').addClass('tool_button_current');});
+ $('#tool_clone_multi').mouseup(function(){$('#tool_clone').removeClass('tool_button_current');});
+ $('#tool_clone_multi').mouseout(function(){$('#tool_clone').removeClass('tool_button_current');});
$('#tool_move_top').mousedown(function(){$('#tool_move_top').addClass('tool_button_current');});
$('#tool_move_top').mouseup(function(){$('#tool_move_top').removeClass('tool_button_current');});
$('#tool_move_top').mouseout(function(){$('#tool_move_top').removeClass('tool_button_current');});
diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js
index 89a49c87..375ae9fc 100644
--- a/editor/svgcanvas.js
+++ b/editor/svgcanvas.js
@@ -7,7 +7,6 @@ if(!window.console) {
// this defines which elements and attributes that we support
// TODO: add
elements to this
-// TODO: add elements to this
// TODO: add elements to this
// TODO: add xmlns:xlink attr to