Fixed issue 370

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1080 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Alexis Deveria 2009-12-22 16:28:31 +00:00
parent 20fb24ca0a
commit 59575e1f71
1 changed files with 8 additions and 6 deletions

View File

@ -2068,7 +2068,11 @@ function svg_edit_setup() {
{key: ['right', true], fn: function(){moveSelected(1,0);}} {key: ['right', true], fn: function(){moveSelected(1,0);}}
]; ];
var key_assocs = {}; // Tooltips not directly associated with a single function
var key_assocs = {
'4/Shift+4': '#tools_rect_show',
'5/Shift+5': '#tools_ellipse_show'
};
return { return {
setAll: function() { setAll: function() {
@ -2124,17 +2128,15 @@ function svg_edit_setup() {
var t = this.title.split(' [')[0]; var t = this.title.split(' [')[0];
var key_str = ''; var key_str = '';
// Shift+Up // Shift+Up
console.log('keyval',keyval)
$.each(keyval.split('/'), function(i, key) { $.each(keyval.split('/'), function(i, key) {
console.log('key',key);
var mod_bits = key.split('+'), mod = ''; var mod_bits = key.split('+'), mod = '';
if(mod_bits.length > 1) { if(mod_bits.length > 1) {
mod = mod_bits[0] + '+'; mod = mod_bits[0] + '+';
key = mod_bits[1]; key = mod_bits[1];
} }
if(uiStrings['key_'+key]) { key_str += (i?'/':'') + mod + (uiStrings['key_'+key] || key);
key_str += (i?'/':'') + mod + uiStrings['key_'+key];
} else {
key_str = key;
}
}); });
this.title = t +' ['+key_str+']'; this.title = t +' ['+key_str+']';
}); });