diff --git a/editor/svg-editor.css b/editor/svg-editor.css
index f20fcde6..5da98ce4 100644
--- a/editor/svg-editor.css
+++ b/editor/svg-editor.css
@@ -485,9 +485,7 @@
top: 2px;
height: 72px;
border-bottom: none;
- /* Ideally this should be auto (makes scrollbar if needed), but currently hides
- the .dropdown lists.
-/* overflow: auto;*/
+ overflow: auto;
}
#svg_editor #tools_left {
@@ -671,7 +669,7 @@ span.zoom_tool {
background: #FFC;
}
-#font_family_dropdown li {
+#font_family_dropdown-list li {
font-size: 1.4em;
}
@@ -914,7 +912,7 @@ span.zoom_tool {
#tools_top .dropdown .icon_label {
border: 1px solid transparent;
- margin-top: 3px;
+/* margin-top: 3px;*/
height: auto;
}
diff --git a/editor/svg-editor.html b/editor/svg-editor.html
index eadd402e..8aced754 100644
--- a/editor/svg-editor.html
+++ b/editor/svg-editor.html
@@ -567,7 +567,7 @@
-
+
diff --git a/editor/svg-editor.js b/editor/svg-editor.js
index 69a39480..55bd6450 100644
--- a/editor/svg-editor.js
+++ b/editor/svg-editor.js
@@ -2130,13 +2130,19 @@
// TODO: Group UI functions into a public svgEditor.ui interface.
Editor.addDropDown = function(elem, callback, dropUp) {
var button = $(elem).find('button');
- var list = $(elem).find('ul');
+ var list = $(elem).find('ul').attr('id', $(elem)[0].id + '-list');
+
+ if(!dropUp) {
+ // Move list to place where it can overflow container
+ $('#option_lists').append(list);
+ }
+
var on_button = false;
if(dropUp) {
$(elem).addClass('dropup');
}
- $(elem).find('li').bind('mouseup', callback);
+ list.find('li').bind('mouseup', callback);
$(window).mouseup(function(evt) {
if(!on_button) {
@@ -2149,7 +2155,16 @@
button.bind('mousedown',function() {
if (!button.hasClass('down')) {
button.addClass('down');
+
+ if(!dropUp) {
+ var pos = $(elem).position();
+ list.css({
+ top: pos.top + 24,
+ left: pos.left - 10
+ });
+ }
list.show();
+
on_button = true;
} else {
button.removeClass('down');
@@ -2249,8 +2264,7 @@
}
});
- Editor.addDropDown('#blur_dropdown', function() {
- });
+ Editor.addDropDown('#blur_dropdown', $.noop);
var slideStart = false;