Skip to content

Commit

Permalink
refactor: declare RubberBandHandler as a plugin
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
tbouffard committed Aug 17, 2024
1 parent 3630e2c commit e72b378
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions projects/_shared/src/generate-graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e72b378

Please sign in to comment.