Merge pull request #131 from jaysc/fastpan

added shift modifier for faster pan
pull/155/head
tobspr 4 years ago committed by GitHub
commit 840ba60c76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -901,8 +901,12 @@ export class Camera extends BasicSerializableObject {
forceX += 1;
}
this.center.x += moveAmount * forceX * this.root.app.settings.getMovementSpeed();
this.center.y += moveAmount * forceY * this.root.app.settings.getMovementSpeed();
let movementSpeed =
this.root.app.settings.getMovementSpeed() *
(actionMapper.getBinding(KEYMAPPINGS.navigation.mapMoveFaster).isCurrentlyPressed() ? 2 : 1);
this.center.x += moveAmount * forceX * movementSpeed;
this.center.y += moveAmount * forceY * movementSpeed;
}
}
}

@ -33,6 +33,7 @@ export const KEYMAPPINGS = {
mapMoveRight: { keyCode: key("D") },
mapMoveDown: { keyCode: key("S") },
mapMoveLeft: { keyCode: key("A") },
mapMoveFaster: { keyCode: 16 }, //shift
centerMap: { keyCode: 32 }, // SPACE
mapZoomIn: { keyCode: 187, repeated: true }, // "+"

@ -691,6 +691,7 @@ keybindings:
mapMoveRight: Move Right
mapMoveDown: Move Down
mapMoveLeft: Move Left
mapMoveFaster: Move Faster
centerMap: Center Map
mapZoomIn: Zoom in

Loading…
Cancel
Save