diff --git a/src/main/compat/helpers.ts b/src/main/compat/helpers.ts index d9133128..caa6121a 100644 --- a/src/main/compat/helpers.ts +++ b/src/main/compat/helpers.ts @@ -1,16 +1,16 @@ import { Assessment, UMLElement, UMLRelationship } from '../typings'; import { UMLModelCompat } from './typings'; import { - isV2, - findElement as findElementV2, + addOrUpdateAssessment as addOrUpdateAssessmentV2, addOrUpdateElement as addOrUpdateElementV2, - findRelationship as findRelationshipV2, addOrUpdateRelationship as addOrUpdateRelationshipV2, findAssessment as findAssessmentV2, - addOrUpdateAssessment as addOrUpdateAssessmentV2, + findElement as findElementV2, + findRelationship as findRelationshipV2, isInteractiveElement as isInteractiveElementV2, - setInteractiveElement as setInteractiveElementV2, isInteractiveRelationship as isInteractiveRelationshipV2, + isV2, + setInteractiveElement as setInteractiveElementV2, setInteractiveRelationship as setInteractiveRelationshipV2, } from './v2'; diff --git a/src/main/components/uml-element/updatable/updatable.tsx b/src/main/components/uml-element/updatable/updatable.tsx index 597b4ad7..21b5d71b 100644 --- a/src/main/components/uml-element/updatable/updatable.tsx +++ b/src/main/components/uml-element/updatable/updatable.tsx @@ -11,11 +11,7 @@ import { FloatingButton } from './FloatingButton'; import { EditIcon } from './icons/EditIcon'; import { DeleteIcon } from './icons/DeleteIcon'; -const FAB_TIMEOUT = 500; - -const initialState = { - showActionButtons: false, -}; +const initialState = {}; type StateProps = { hovered: boolean; @@ -67,22 +63,6 @@ export const updatable = ( const element = getById(props.id); - // We wait a few milliseconds before hiding the float action buttons - // to prevent the actions from being hidden un - if (!this.state.showActionButtons && (hovered || selected)) { - this.setState({ ...this.state, showActionButtons: true }); - - if (this.timer) { - clearTimeout(this.timer); - } - } - - if (this.state.showActionButtons && !(hovered || selected)) { - this.timer = setTimeout(() => { - this.setState({ ...this.state, showActionButtons: false }); - }, FAB_TIMEOUT); - } - const shouldRenderFABs = element && !UMLRelationship.isUMLRelationship(element); return ( @@ -90,8 +70,8 @@ export const updatable = ( {shouldRenderFABs && ( @@ -101,8 +81,8 @@ export const updatable = ( {shouldRenderFABs && ( diff --git a/src/main/packages/bpmn/bpmn-swimlane/bpmn-swimlane.ts b/src/main/packages/bpmn/bpmn-swimlane/bpmn-swimlane.ts index 3bfb5924..2d1811be 100644 --- a/src/main/packages/bpmn/bpmn-swimlane/bpmn-swimlane.ts +++ b/src/main/packages/bpmn/bpmn-swimlane/bpmn-swimlane.ts @@ -15,15 +15,12 @@ export class BPMNSwimlane extends UMLContainer { droppable: true, movable: false, connectable: false, + updatable: false, resizable: 'HEIGHT', }; type: UMLElementType = BPMNElementType.BPMNSwimlane; - // We set this flag to indicate that swimlanes should not be picked up by the layouter - // for resizing-based repositioning. - isManuallyLayouted = true; - render(layer: ILayer, children: ILayoutable[] = []): ILayoutable[] { if (this.bounds.height < BPMNSwimlane.MIN_HEIGHT) { this.bounds.height = BPMNSwimlane.MIN_HEIGHT; diff --git a/src/main/services/uml-element/remote-selectable/remote-selectable-types.ts b/src/main/services/uml-element/remote-selectable/remote-selectable-types.ts index 242d69e1..c6c19104 100644 --- a/src/main/services/uml-element/remote-selectable/remote-selectable-types.ts +++ b/src/main/services/uml-element/remote-selectable/remote-selectable-types.ts @@ -1,6 +1,5 @@ import { UMLElementSelectorType } from '../../../packages/uml-element-selector-type'; import { Action } from '../../../utils/actions/actions'; -import { UMLElementState } from '../uml-element-types'; export const enum RemoteSelectionActionTypes { SELECTION_CHANGE = '@@element/remote-selection/CHANGE', diff --git a/src/main/services/uml-element/remote-selectable/remote-selection-repository.ts b/src/main/services/uml-element/remote-selectable/remote-selection-repository.ts index f1f61e9c..4cc02409 100644 --- a/src/main/services/uml-element/remote-selectable/remote-selection-repository.ts +++ b/src/main/services/uml-element/remote-selectable/remote-selection-repository.ts @@ -1,9 +1,9 @@ import { UMLElementSelectorType } from '../../../packages/uml-element-selector-type'; import { RemoteSelectionActionTypes, - RemoteSelectionChangeTypes, RemoteSelectionChange, RemoteSelectionChangeAction, + RemoteSelectionChangeTypes, RemoteSelectionPruneSelectorsAction, } from './remote-selectable-types'; diff --git a/src/main/services/uml-element/uml-element.ts b/src/main/services/uml-element/uml-element.ts index 2d3d6aa4..43f59a0a 100644 --- a/src/main/services/uml-element/uml-element.ts +++ b/src/main/services/uml-element/uml-element.ts @@ -1,6 +1,5 @@ import { DeepPartial } from 'redux'; import { UMLDiagramType } from '../../packages/diagram-type'; -import { UMLElementSelectorType } from '../../packages/uml-element-selector-type'; import { UMLElementType } from '../../packages/uml-element-type'; import { UMLRelationshipType } from '../../packages/uml-relationship-type'; import * as Apollon from '../../typings'; diff --git a/src/main/typings.ts b/src/main/typings.ts index 61f3c0bd..5ac00c49 100644 --- a/src/main/typings.ts +++ b/src/main/typings.ts @@ -1,7 +1,6 @@ import { DeepPartial } from 'redux'; import { Styles } from './components/theme/styles'; import { UMLDiagramType } from './packages/diagram-type'; -import { UMLElementSelectorType } from './packages/uml-element-selector-type'; import { UMLElementType } from './packages/uml-element-type'; import { UMLRelationshipType } from './packages/uml-relationship-type'; import { ApollonMode, Locale } from './services/editor/editor-types'; diff --git a/src/tests/unit/compat/v2/helper-test.ts b/src/tests/unit/compat/v2/helper-test.ts index 8b2e6240..e1e4a140 100644 --- a/src/tests/unit/compat/v2/helper-test.ts +++ b/src/tests/unit/compat/v2/helper-test.ts @@ -1,17 +1,17 @@ import { deepClone } from 'fast-json-patch'; import { - UMLModelCompat, - findElement, + addOrUpdateAssessment, addOrUpdateElement, - findRelationship, addOrUpdateRelationship, findAssessment, - addOrUpdateAssessment, + findElement, + findRelationship, isInteractiveElement, - setInteractiveElement, isInteractiveRelationship, + setInteractiveElement, setInteractiveRelationship, + UMLModelCompat, } from '../../../../main/compat'; import { Assessment, UMLElement, UMLModel, UMLRelationship } from '../../../../main'; diff --git a/src/tests/unit/services/patcher/patcher-saga-test.ts b/src/tests/unit/services/patcher/patcher-saga-test.ts index 8c26ed7a..f499f4f2 100644 --- a/src/tests/unit/services/patcher/patcher-saga-test.ts +++ b/src/tests/unit/services/patcher/patcher-saga-test.ts @@ -1,4 +1,4 @@ -import { take, delay, select, call } from 'redux-saga/effects'; +import { call, delay, select, take } from 'redux-saga/effects'; import { patchLayout } from '../../../../main/services/patcher/patcher-saga'; import { PatcherActionTypes, PatcherRepository } from '../../../../main/services/patcher';