documentationfor yFiles for HTML 3.0.0.3

Resource Keys

Customizing String Resources

Common string resources such as command names, keyboard shortcuts, undo unit names, and UI labels can be customized. The key and value pairs are stored globally in the yfiles.resources variable.

The resources are subdivided into UI cultures. For example, resources for American English should be stored in yfiles.resources["en-US"]. By default, all resources are stored in yfiles.resources["invariant"]. This is also the fallback for all cultures if a specific key is not found.

To customize resources, create a variable with the name of the key and the desired value in the respective resource object. If the resource object is not yet initialized, create it first. The initialization of the yFiles for HTML resources is non-destructive. Custom values stored in yfiles.resources before initializing the yfiles library are not overwritten by defaults. For example, you can customize the key gesture for node grouping by changing the value of the resource key "GroupSelectionKey".

Customizing a Resource
yfiles.resources['invariant']['GroupSelectionKey'] = 'Shift+G'
Note

The customization of a resource has to be done before the commands are initialized, e.g. before the GraphComponent is instantiated.

Resources Defaults

The following table lists the resource defaults stored in yfiles.resources["invariant"] alphabetically.

Resource Defaults
Key Value

AddBend.RedoName

Add Bend

AddBend.UndoName

Remove Bend

AddLabel

Add Label

AddLabel.RedoName

Add Label

AddLabel.UndoName

Remove Label

AddLabelKey

Shift+F2

AddPort.RedoName

Add Port

AddPort.UndoName

Remove Port

AdjustGroupNodeSize

Adjust Group Node Size

AdjustGroupNodeSize.RedoName

Adjust Group Node Size

AdjustGroupNodeSize.UndoName

Adjust Group Node Size

AdjustGroupNodeSizeKey

Control+Shift+G

AdjustToSizeConstraints.RedoName

Adjust Node Size

AdjustToSizeConstraints.UndoName

Adjust Node Size

BeginEdgeCreation

Create Edge

CollapseGroup

Collapse Group

CollapseGroupKey

Alt+ArrowLeft

CollapseNode.RedoName

Collapse Node

CollapseNode.UndoName

Expand Node

Copy

Copy

CopyKey

Action+C;Control+Insert

CreateEdge.RedoName

Add Edge

CreateEdge.UndoName

Remove Edge

CreateNode.RedoName

Add Node

CreateNode.UndoName

Remove Node

CreateStripe.RedoName

Add Stripe

CreateStripe.UndoName

Remove Stripe

Cut

Cut

Cut.RedoName

Redo Cut

Cut.UndoName

Undo Cut

CutKey

Action+X;Shift+Delete

DecreaseZoom

Zoom Out

DecreaseZoomKey

Action+Subtract

Delete

Delete

DeleteKey

Delete;Backspace

DeleteSelection.RedoName

Redo Delete

DeleteSelection.UndoName

Undo Delete

DeselectAll

Deselect All

DeselectAllKey

Action+Shift+A

DeselectItem

Deselect Item

Duplicate

Duplicate

Duplicate.RedoName

Redo Duplicate

Duplicate.UndoName

Undo Duplicate

DuplicateKey

Action+D

EditLabel

Edit Label

EditLabelKey

F2;Enter

EnterGroup

Enter Group

EnterGroupKey

Alt+ArrowDown

ExitGroup

Exit Group

ExitGroupKey

Alt+ArrowUp

ExpandGroup

Expand Group

ExpandGroup.RedoName

Expand Group

ExpandGroup.UndoName

Collapse Group

ExpandGroupKey

Alt+ArrowRight

ExtendSelectionDown

Extend Selection Down

ExtendSelectionDownKey

Shift+ArrowDown

ExtendSelectionHierarchyDown

Extend Selection to Child

ExtendSelectionHierarchyDownKey

Shift+Ctrl+PageDown

ExtendSelectionHierarchyUp

Extend Selection to Parent

ExtendSelectionHierarchyUpKey

Shift+Ctrl+PageUp

ExtendSelectionLeft

Extend Selection Left

ExtendSelectionLeftKey

Shift+ArrowLeft

ExtendSelectionRight

Extend Selection Right

ExtendSelectionRightKey

Shift+ArrowRight

ExtendSelectionUp

Extend Selection Up

ExtendSelectionUpKey

Shift+ArrowUp

FitContent

Fit Content

FitGraphBounds

Fit Graph Bounds

FitGraphBoundsKey

Alt+1

GroupSelection

Group Selection

GroupSelectionKey

Action+G

IncreaseZoom

Zoom In

IncreaseZoomKey

Action+Add

Lower

Lower

Lower.RedoName

Lower

Lower.UndoName

Lower

Move.RedoName

Move Items

Move.UndoName

Move Items

MoveDown

Move Down

MoveDownKey

ArrowDown

MoveFocusDown

Move Focus Down

MoveFocusDownKey

Action+ArrowDown

MoveFocusHierarchyDown

Move Focus to Child

MoveFocusHierarchyDownKey

Ctrl+PageDown

MoveFocusHierarchyUp

Move Focus to Parent

MoveFocusHierarchyUpKey

Ctrl+PageUp

MoveFocusLeft

Move Focus Left

MoveFocusLeftKey

Action+ArrowLeft

MoveFocusRight

Move Focus Right

MoveFocusRightKey

Action+ArrowRight

MoveFocusUp

Move Focus Up

MoveFocusUpKey

Action+ArrowUp

MoveHandle.RedoName

Move Handle

MoveHandle.UndoName

Move Handle

MoveHierarchyDown

Move to child

MoveHierarchyDownKey

Alt+PageDown

MoveHierarchyUp

Move to Parent

MoveHierarchyUpKey

Alt+PageUp

MoveLeft

Move Left

MoveLeftKey

ArrowLeft

MoveRight

Move Right

MoveRightKey

ArrowRight

MoveUp

Move Up

MoveUpKey

ArrowUp

New

New

NewKey

Action+N

NodeDropInputMode.NodeDropped.RedoName

Add Node

NodeDropInputMode.NodeDropped.UndoName

Remove Node

Paste

Paste

Paste.RedoName

Redo Paste

Paste.UndoName

Undo Paste

PasteKey

Action+V;Shift+Insert

Raise

Raise

Raise.RedoName

Raise

Raise.UndoName

Raise

Redo

Redo

RedoKey

Action+Y;Action+Shift+Z

RemoveBend.RedoName

Remove Bend

RemoveBend.UndoName

Add Bend

RemoveEdge.RedoName

Remove Edge

RemoveEdge.UndoName

Add Edge

RemoveLabel.RedoName

Remove Label

RemoveLabel.UndoName

Add Label

RemoveNode.RedoName

Remove Node

RemoveNode.UndoName

Add Node

RemovePort.RedoName

Remove Port

RemovePort.UndoName

Add Port

RemoveStripe.RedoName

Remove Stripe

RemoveStripe.UndoName

Add Stripe

ReparentStripe.RedoName

Reparent Stripe

ReparentStripe.UndoName

Reparent Stripe

ResizeNode.RedoName

Resize Node

ResizeNode.UndoName

Resize Node

ReverseEdge

Reverse Edge

ReverseEdge.RedoName

Reverse Edge

ReverseEdge.UndoName

Reverse Edge

ReverseEdgeKey

Action+R

ScrollPageDown

Scroll Page Down

ScrollPageDownKey

PageDown

ScrollPageLeft

Scroll Page Left

ScrollPageLeftKey

Shift+PageUp

ScrollPageRight

Scroll Page Right

ScrollPageRightKey

Shift+PageDown

ScrollPageUp

Scroll Page Up

ScrollPageUpKey

PageUp

SelectAll

Select All

SelectAllKey

Action+A

SelectItem

Select Item

SetCurrentItem

Set Current Item

SetEdgePorts.RedoName

Reconnect Edge

SetEdgePorts.UndoName

Reconnect Edge

SetEdgeStyle.RedoName

Change Edge Style

SetEdgeStyle.UndoName

Change Edge Style

SetIsGroupNode.RedoName

Convert Back to Normal Node

SetIsGroupNode.UndoName

Convert to Group Node

SetIsNoGroupNode.RedoName

Convert Back to Group Node

SetIsNoGroupNode.UndoName

Convert to Normal Node

SetLabelModelParameter.RedoName

Change Label Position

SetLabelModelParameter.UndoName

Change Label Position

SetLabelStyle.RedoName

Change Label Style

SetLabelStyle.UndoName

Change Label Style

SetLabelText.RedoName

Change Label Text

SetLabelText.UndoName

Change Label Text

SetLocationModelParameter.RedoName

Change Port Location

SetLocationModelParameter.UndoName

Change Port Location

SetNodeStyle.RedoName

Change Node Style

SetNodeStyle.UndoName

Change Node Style

SetParent.RedoName

Change Parent

SetParent.UndoName

Change Parent

SetPortLocationParameter.RedoName

Change Port Location

SetPortLocationParameter.UndoName

Change Port Location

SetPorts.RedoName

Reconnect Edge

SetPorts.UndoName

Reconnect Edge

SetPortStyle.RedoName

Change Port Style

SetPortStyle.UndoName

Change Port Style

SetPreferredLabelSize.RedoName

Change Preferred Label Size

SetPreferredLabelSize.UndoName

Change Preferred Label Size

SetStripeMinimumSize.RedoName

Change Minimum Stripe Size

SetStripeMinimumSize.UndoName

Change Minimum Stripe Size

SetStripePadding.RedoName

Change Stripe Insets

SetStripePadding.UndoName

Change Stripe Insets

SetStripeSize.RedoName

Change Stripe Size

SetStripeSize.UndoName

Change Stripe Size

SetStripeStyle.RedoName

Change Stripe Style

SetStripeStyle.UndoName

Change Stripe Style

TagChange.RedoName

Change Tag

TagChange.UndoName

Change Tag

ToBack

To Back

ToBack.RedoName

To Back

ToBack.UndoName

To Back

ToFront

To Front

ToFront.RedoName

To Front

ToFront.UndoName

To Front

ToggleExpansionState

Toggle Expansion State

ToggleExpansionStateKey

Alt+Shift+ArrowLeft;Alt+Shift+ArrowRight

ToggleItemSelection

Toggle Selection

ToggleItemSelectionKey

Control+Space

Unavailable

Unavailable

Unavailable

Unavailable

Undo

Undo

UndoKey

Action+Z

UngroupSelection

Ungroup Selection

UngroupSelectionKey

Action+U

UpdateContentBounds

Update Content Bounds

Zoom 100%

Zoom

ZoomKey

Action+0;Alt+0

ZoomToCurrentItem

Zoom To Current Item

ZoomToCurrentItemKey

Alt+3

ZoomToSelection

Zoom To Selected Items

ZoomToSelectionKey

Alt+2

Note that, in the table above, Action+Key defines a hotkey that uses <kbd>Ctrl</kbd> on non-Mac systems and ⌘ on macOS. For more details on keyboard shortcuts, refer to List of Keyboard Shortcuts.

Resources that describe keyboard shortcuts support key values as outlined in KeyboardEvent.key. These values are treated as case-insensitive since modifiers are handled separately.