Merge pull request #131 from jaysc/fastpan
added shift modifier for faster pan
This commit is contained in:
commit
840ba60c76
|
@ -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…
Reference in New Issue