mirror of
https://github.com/Doodle3D/doodle3d-client.git
synced 2024-11-22 17:27:57 +01:00
Fix direction of rotate buttons.
Ignore key presses with modifiers in order to not obstruct regular shortcuts.
This commit is contained in:
parent
606f7cb359
commit
e125939db8
@ -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);
|
||||||
|
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user