0
0
mirror of https://github.com/Doodle3D/doodle3d-client.git synced 2024-11-05 19:43:24 +01:00

Fix direction of rotate buttons.

Ignore key presses with modifiers in order to not obstruct regular shortcuts.
This commit is contained in:
Wouter R 2014-01-15 14:20:49 +01:00
parent 606f7cb359
commit e125939db8
2 changed files with 2 additions and 1 deletions

View File

@ -5,6 +5,7 @@ function initKeyboard() {
$(document).keypress(function(event) { $(document).keypress(function(event) {
if (!keyboardShortcutsEnabled) return; if (!keyboardShortcutsEnabled) return;
if (event.altKey || event.ctrlKey || event.metaKey) return; //ignore key presses with modifier keys except shift
var ch = String.fromCharCode(event.which); var ch = String.fromCharCode(event.which);

View File

@ -135,7 +135,7 @@ function initButtonBehavior() {
function onBtnRotate(e,cursor) { function onBtnRotate(e,cursor) {
var h = btnZoom.height(); var h = btnZoom.height();
var multiplier = (h/2-cursor.y)*0.003; var multiplier = (h/2-cursor.y)*0.003;
rotateShape(multiplier); rotateShape(-multiplier);
//if (cursor.y<25) rotateShape(.1); //if (cursor.y<25) rotateShape(.1);
//else if (cursor.y>55) rotateShape(-.1); //else if (cursor.y>55) rotateShape(-.1);
} }