Configuration Properties
Often, the logic to accomplish specific tasks in yFiles for HTML is not hard-coded. Instead, it’s encapsulated in functional interfaces and configuration classes whenever possible.
Because yFiles for HTML is built in a highly modular way, exchanging these objects on the operating classes is one of the most common ways to customize yFiles for HTML. For example, you can completely change the possible user interactions in a yFiles for HTML application by simply exchanging the IInputMode set on the inputMode property of the GraphComponent.
You can configure the user interaction to behave like an editor by setting an instance of GraphEditorInputMode as the IInputMode for the GraphComponent:
graphComponent.inputMode = new GraphEditorInputMode()
In the next example, we change the set of available user interactions on the GraphComponent completely by setting an instance of GraphViewerInputMode as the GraphComponent’s IInputMode.
graphComponent.inputMode = new GraphViewerInputMode()
By default, the GraphViewerInputMode is already set as the IInputMode on the GraphComponent.
When you are looking for a way to change yFiles for HTML’s default behavior, always look for properties that might be related to your needs and use object composition.