mirror of
https://github.com/stan-smith/FossFLOW.git
synced 2025-12-24 06:58:48 -05:00
refactor: remove redundant setMode calls in interaction modes
This commit is contained in:
@@ -98,11 +98,5 @@ export const Connector: ModeActions = {
|
||||
) {
|
||||
scene.deleteConnector(uiState.mode.id);
|
||||
}
|
||||
|
||||
uiState.actions.setMode({
|
||||
type: 'CURSOR',
|
||||
showCursor: true,
|
||||
mousedownItem: null
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -13,14 +13,6 @@ export const PlaceIcon: ModeActions = {
|
||||
tile: uiState.mouse.position.tile,
|
||||
scene
|
||||
});
|
||||
|
||||
uiState.actions.setMode({
|
||||
type: 'CURSOR',
|
||||
mousedownItem: itemAtTile,
|
||||
showCursor: true
|
||||
});
|
||||
|
||||
uiState.actions.setItemControls(null);
|
||||
}
|
||||
},
|
||||
mouseup: ({ uiState, scene }) => {
|
||||
|
||||
@@ -43,11 +43,5 @@ export const DrawRectangle: ModeActions = {
|
||||
},
|
||||
mouseup: ({ uiState }) => {
|
||||
if (uiState.mode.type !== 'RECTANGLE.DRAW' || !uiState.mode.id) return;
|
||||
|
||||
uiState.actions.setMode({
|
||||
type: 'CURSOR',
|
||||
showCursor: true,
|
||||
mousedownItem: null
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -26,11 +26,5 @@ export const TextBox: ModeActions = {
|
||||
id: uiState.mode.id
|
||||
});
|
||||
}
|
||||
|
||||
uiState.actions.setMode({
|
||||
type: 'CURSOR',
|
||||
showCursor: true,
|
||||
mousedownItem: null
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user