Changing the Multi Selection Modifier (version 1.x)

Tips & Tricks

Summary

Changing the default multi selection gesture from Ctrl+Click to another modifier

This article was written for an older version. It is only online as a reference for customers using this old version. The information it contains is probably out of date.

The latest information can be found in the yFiles documentation

Description

To change the default gesture for multi selection, use property multiSelectionRecognizer. Set the property to an arbitrary IEventRecognizer, e.g. to a key event. The recognizer is queried when an item is selected to decide whether to enhance the selection.

// change to Shift+Click
graphEditorInputMode.multiSelectionRecognizer = yfiles.input.KeyEvents.SHIFT_PRESSED;

You can create a recogizer that runs custom code using EventRecognizers.create.

Categories this article belongs to:
yFiles for HTML
Applies to:
yFiles for HTML: 1.3, 1.4
Keywords:
Multiple - Select - Control - Ctrl - Click - multiSelectionRecognizer - IEventRecognizer