File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed
riotTags/editors/room-editor Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ export interface IRoomEditorRiotTag extends IRiotTag {
3030 gridOn : boolean ;
3131 freePlacementMode : boolean ;
3232 controlMode : boolean ;
33+ spacebarMode : boolean ;
3334 currentTool : tool ;
3435 currentTemplate : ITemplate | - 1 ;
3536 setTool ( tool : tool ) : ( ) => void ;
Original file line number Diff line number Diff line change @@ -16,9 +16,10 @@ interface IMoveCameraAffixedData {
1616const moveCameraOnWheelPress : IRoomEditorInteraction < IMoveCameraAffixedData > = {
1717 ifListener : 'pointerdown' ,
1818 if ( e : PIXI . FederatedPointerEvent ) {
19- // Checks for a pressed mouse wheel
19+ // Checks for a pressed mouse wheel, or Alt+Shift dragging, or Spacebar
2020 return e . button === 1 ||
21- ( e . altKey && e . shiftKey ) ;
21+ ( e . altKey && e . shiftKey ) ||
22+ this . riotEditor . spacebarMode ;
2223 } ,
2324 listeners : {
2425 pointerdown ( e : PIXI . FederatedPointerEvent , roomTag , affixedData ) {
Original file line number Diff line number Diff line change @@ -218,6 +218,9 @@ room-editor.aPanel.aView(data-hotkey-scope="{asset.uid}")
218218 e.preventDefault();
219219 } else if (e.key === 'Shift') {
220220 this.controlMode = false;
221+ } else if (e.key === ' ') {
222+ this.spacebarMode = true;
223+ e.preventDefault();
221224 }
222225 };
223226 const modifiersUpListener = e => {
@@ -233,6 +236,9 @@ room-editor.aPanel.aView(data-hotkey-scope="{asset.uid}")
233236 } else if (e.key === 'Control' || e.key.Meta) {
234237 this.controlMode = false;
235238 e.preventDefault();
239+ } else if (e.key === ' ') {
240+ this.spacebarMode = false;
241+ e.preventDefault();
236242 }
237243 };
238244 const blurListener = () => {
You can’t perform that action at this time.
0 commit comments