mirror of
https://github.com/stan-smith/FossFLOW.git
synced 2025-12-24 06:58:48 -05:00
fix: ui bug when creating scene elements
...and simultaneously clicking on a toolmenu item
This commit is contained in:
@@ -34,8 +34,13 @@ export const AreaTool: InteractionReducer = {
|
||||
|
||||
uiState.actions.setMode(newMode);
|
||||
},
|
||||
mouseup: ({ uiState, scene }) => {
|
||||
if (uiState.mode.type !== 'AREA_TOOL' || !uiState.mode.area) return;
|
||||
mouseup: ({ uiState, scene, isRendererInteraction }) => {
|
||||
if (
|
||||
uiState.mode.type !== 'AREA_TOOL' ||
|
||||
!uiState.mode.area ||
|
||||
!isRendererInteraction
|
||||
)
|
||||
return;
|
||||
|
||||
scene.actions.createGroup({
|
||||
id: generateId(),
|
||||
|
||||
@@ -101,8 +101,8 @@ export const Connector: InteractionReducer = {
|
||||
uiState.actions.setMode(newMode);
|
||||
}
|
||||
},
|
||||
mouseup: ({ uiState, scene }) => {
|
||||
if (uiState.mode.type !== 'CONNECTOR') return;
|
||||
mouseup: ({ uiState, scene, isRendererInteraction }) => {
|
||||
if (uiState.mode.type !== 'CONNECTOR' || !isRendererInteraction) return;
|
||||
|
||||
if (uiState.mode.connector && uiState.mode.connector.anchors.length >= 2) {
|
||||
scene.actions.createConnector(
|
||||
|
||||
Reference in New Issue
Block a user