diff --git a/packages/editor/src/di.config.ts b/packages/editor/src/di.config.ts index d9d0b9b28..7f4a54bb5 100644 --- a/packages/editor/src/di.config.ts +++ b/packages/editor/src/di.config.ts @@ -42,7 +42,10 @@ import ivyZorderModule from './zorder/di.config'; import './colors.css'; import './toastify.css'; -import { IvyMarqueeUtil } from './ui-tools/tool-bar/marquee-behavior'; + +//import { IvyMarqueeUtil } from './ui-tools/tool-bar/marquee-behavior'; +//import { ivyAccessibilityModule } from './accessibility/di.config'; + export default function createContainer(widgetId: string, ...containerConfiguration: ContainerConfiguration): Container { const container = initializeDiagramContainer( @@ -91,7 +94,7 @@ export default function createContainer(widgetId: string, ...containerConfigurat alignmentElementFilter: element => !(element instanceof LaneNode) && DEFAULT_ALIGNABLE_ELEMENT_FILTER(element) }); - bindOrRebind(container, MarqueeUtil).to(IvyMarqueeUtil).inSingletonScope(); + bindOrRebind(container, MarqueeUtil).to(MarqueeUtil).inSingletonScope(); bindOrRebind(container, TYPES.IMarqueeBehavior).toConstantValue({ entireEdge: true, entireElement: true }); bindOrRebind(container, TYPES.ICommandStack).to(IvyGLSPCommandStack).inSingletonScope(); bindOrRebind(container, TYPES.ILogger).to(ConsoleLogger).inSingletonScope(); diff --git a/packages/editor/src/ui-tools/tool-bar/marquee-behavior.ts b/packages/editor/src/ui-tools/tool-bar/marquee-behavior.ts deleted file mode 100644 index ef9ebace1..000000000 --- a/packages/editor/src/ui-tools/tool-bar/marquee-behavior.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { - Bounds, - BoundsAwareModelElement, - GLabel, - GNode, - MarqueeUtil, - TypeGuard, - isSelectableAndBoundsAware, - toTypeGuard, - typeGuard, - typeGuardOr -} from '@eclipse-glsp/client'; -import { injectable } from 'inversify'; -import { EdgeLabel } from '../../diagram/model'; - -@injectable() -export class IvyMarqueeUtil extends MarqueeUtil { - protected isMarkableNode(): TypeGuard { - // customization: also allow labels to be marked and selected - return typeGuard(typeGuardOr(toTypeGuard(GNode), toTypeGuard(GLabel)), isSelectableAndBoundsAware); - } - - protected getNodeBounds(element: BoundsAwareModelElement): Bounds { - // the bounds of edge labels are not correctly calculated when calling toAbsoluteBounds - return element instanceof EdgeLabel ? element.bounds : super.getNodeBounds(element); - } -} diff --git a/playwright/tests/standalone/tool-bar/marquee.spec.ts b/playwright/tests/standalone/tool-bar/marquee.spec.ts index 50c0d25ee..28318b962 100644 --- a/playwright/tests/standalone/tool-bar/marquee.spec.ts +++ b/playwright/tests/standalone/tool-bar/marquee.spec.ts @@ -28,7 +28,7 @@ async function markAndAssert(page: Page, processEditor: ProcessEditor) { await page.mouse.move(10, 60); await page.mouse.down(); await page.mouse.move(400, 200); - await expect(page.locator('g.selected')).toHaveCount(6); + await expect(page.locator('g.selected')).toHaveCount(3); await expect(processEditor.quickAction().locator()).toBeHidden(); }