From afcdc932ff1c194939f4f5b30721384dc36ca186 Mon Sep 17 00:00:00 2001 From: Jacques Distler Date: Sat, 13 Feb 2010 22:19:14 -0600 Subject: [PATCH] Two SVG-Editor buglets Should not be able to convert a foreignObject to a path. #foreignObject_panel should always be initially invisible. --- public/svg-edit/editor/svg-editor.css | 3 ++- public/svg-edit/editor/svg-editor.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/public/svg-edit/editor/svg-editor.css b/public/svg-edit/editor/svg-editor.css index 492f6653..80962abe 100644 --- a/public/svg-edit/editor/svg-editor.css +++ b/public/svg-edit/editor/svg-editor.css @@ -1,4 +1,4 @@ -body { +body { background: #D8D8D8; } @@ -410,6 +410,7 @@ #svg_editor #line_panel, #svg_editor #image_panel, #svg_editor #text_panel, +#svg_editor #foreignObject_panel, #svg_editor #path_node_panel { display: none; } diff --git a/public/svg-edit/editor/svg-editor.js b/public/svg-edit/editor/svg-editor.js index b4c81b89..bc48b0a0 100644 --- a/public/svg-edit/editor/svg-editor.js +++ b/public/svg-edit/editor/svg-editor.js @@ -772,7 +772,7 @@ function svg_edit_setup() { } // Elements in this array cannot be converted to a path - var no_path = $.inArray(elname, ['image', 'text', 'path', 'g', 'use']) == -1; + var no_path = $.inArray(elname, ['image', 'text', 'path', 'g', 'use', 'foreignObject']) == -1; $('#tool_topath').toggle(no_path); $('#tool_reorient').toggle(elname == 'path'); $('#tool_reorient').toggleClass('disabled', angle == 0);