Fix Issue 180: contextual tool buttons show as pressed in when pressed, also highlighted when hovered

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@833 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
Jeff Schiller
2009-10-15 14:49:06 +00:00
parent 644310d412
commit 14dad9f1c8
3 changed files with 42 additions and 25 deletions

View File

@@ -1169,6 +1169,16 @@ function svg_edit_setup() {
}).mouseup(function() {
$(this).removeClass('layer_buttonpressed');
});
$('.push_button').mousedown(function() {
if (!$(this).hasClass('tool_button_disabled')) {
$(this).addClass('push_button_pressed');
}
}).mouseout(function() {
$(this).removeClass('push_button_pressed');
}).mouseup(function() {
$(this).removeClass('push_button_pressed');
});
$('#layer_new').click(function() {
var curNames = new Array(svgCanvas.getNumLayers());