From e72b3783fb16e7557fc944ad2abd5ae3d1e5da0a Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Sat, 17 Aug 2024 10:51:47 +0200 Subject: [PATCH] refactor: declare RubberBandHandler as a plugin [skip ci] --- projects/_shared/src/generate-graph.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/projects/_shared/src/generate-graph.ts b/projects/_shared/src/generate-graph.ts index c05fec7..263b235 100644 --- a/projects/_shared/src/generate-graph.ts +++ b/projects/_shared/src/generate-graph.ts @@ -11,6 +11,12 @@ export const initializeGraph = (container: HTMLElement) => { // Disables the built-in context menu InternalEvent.disableContextMenu(container); + // TODO declare rubberband as a plugin - requires https://github.com/maxGraph/maxGraph/pull/501 + // const graph = new Graph(container, undefined, [ + //...getDefaultPlugins(), + //RubberBandHandler, // Enables rubber band selection + // ]); + const graph = new Graph(container); graph.setPanning(true); // Use mouse right button for panning new RubberBandHandler(graph); // Enables rubber band selection