mirror of
https://github.com/FoggedLens/iD.git
synced 2026-04-21 11:16:36 +02:00
Use platform-specific mod keys, refs #676
This commit is contained in:
@@ -125,6 +125,7 @@ iD.detect = function() {
|
||||
else if (nav('Mac')) browser.os = 'mac';
|
||||
else if (nav('X11')) browser.os = 'linux';
|
||||
else if (nav('Linux')) browser.os = 'linux';
|
||||
else browser.os = 'win';
|
||||
|
||||
return browser;
|
||||
};
|
||||
|
||||
+8
-2
@@ -210,14 +210,20 @@ iD.ui = function(context) {
|
||||
}
|
||||
}
|
||||
|
||||
var mod = {
|
||||
'mac': '⌘',
|
||||
'win': 'Ctrl',
|
||||
'linux': 'Ctrl'
|
||||
}[iD.detect().os];
|
||||
|
||||
limiter.select('#undo')
|
||||
.classed('disabled', !undo)
|
||||
.attr('data-original-title', hintprefix('⌘ + Z', undo || t('nothing_to_undo')))
|
||||
.attr('data-original-title', hintprefix(mod + ' + Z', undo || t('nothing_to_undo')))
|
||||
.call(refreshTooltip);
|
||||
|
||||
limiter.select('#redo')
|
||||
.classed('disabled', !redo)
|
||||
.attr('data-original-title', hintprefix('⌘ + ⇧ + Z', redo || t('nothing_to_redo')))
|
||||
.attr('data-original-title', hintprefix(mod + ' + ⇧ + Z', redo || t('nothing_to_redo')))
|
||||
.call(refreshTooltip);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user