Change flyouts to close when mousing out. Also since rect/ellipse flyouts can no longer get stuck open, remove code to hide them and change color picker to not be a flyout

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@216 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Jeff Schiller 2009-06-28 05:09:10 +00:00
parent 83f2dbf6df
commit 9293eb66e6
3 changed files with 14 additions and 13 deletions

View File

@ -200,12 +200,12 @@ div.color_block {
padding: 2px;
}
#svg_editor #color_pick {
#svg_editor #color_picker {
position: absolute;
display: none;
background: #E8E8E8;
border: 1px solid #808080;
padding: 5px;
/* border: 1px solid #808080;
padding: 5px;*/
}
#svg_editor .tools_flyout {

View File

@ -228,7 +228,7 @@
</div> <!-- stroke -->
</div> <!-- tools -->
<div id="color_picker" class="tools_flyout"></div>
<div id="color_picker"></div>
<div id="tools_rect" class="tools_flyout">
<div id="tool_square" title="Square"></div>

View File

@ -227,14 +227,12 @@ function svg_edit_setup() {
// This is a common function used when a tool has been clicked (chosen)
// It does several common things:
// - hides any flyout menus
// - removes the tool_button_current class from whatever tool currently has it
// - adds the tool_button_current class to the button passed in
var toolButtonClick = function(button) {
if ($(button).hasClass('tool_button_disabled')) return false;
$('#styleoverrides').text('');
$('.tools_flyout').hide("slow");
$('.tool_button_current').removeClass('tool_button_current').addClass('tool_button');
$(button).addClass('tool_button_current');
// when a tool is selected, we should deselect the currently selected element
@ -420,7 +418,6 @@ function svg_edit_setup() {
$(document).bind('keydown', {combi:'y', disableInInput: true}, clickRedo);
var colorPicker = function(elem) {
$('.tools_flyout').hide();
var oldbg = elem.css('background');
var color = elem.css('background-color');
var was_none = false;
@ -512,15 +509,19 @@ function svg_edit_setup() {
updateToolButtonState();
});
// this hides any flyouts and then shows the rect flyout
$('#tools_rect_show').mouseover(function(){
$('.tools_flyout').hide();
$('#tools_rect_show').mouseenter(function(){
$('#tools_rect').show();
});
// this hides any flyouts and then shows the circle flyout
$('#tools_ellipse_show').mouseover(function(){
$('.tools_flyout').hide();
$('#tools_rect').mouseleave(function() {
$('#tools_rect').hide();
});
$('#tools_ellipse').mouseleave(function() {
$('#tools_ellipse').hide();
});
$('#tools_ellipse_show').mouseenter(function(){
$('#tools_ellipse').show();
});