documentationfor yFiles for HTML 3.0-EAP3

Resources

Customizing String Resources

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

The resources are subdivided into UI cultures. For example, resources for the American English language 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 certain key is not found.

In order 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 initialized, yet, create it first. Initialization of the yFiles for HTML resources is non-destructive, i.e. 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";

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 resources defaults stored in yfiles.resources["invariant"] alphabetically.

Resources Defaults
Key Value
AddBend.RedoNameAdd Bend
AddBend.UndoNameRemove Bend
AddLabel.RedoNameAdd Label
AddLabel.UndoNameRemove Label
AddLabelAdd Label
AddLabelKeyShift+F2
AddPort.RedoNameAdd Port
AddPort.UndoNameRemove Port
AdjustGroupNodeSize.RedoNameAdjust Group Node Size
AdjustGroupNodeSize.UndoNameAdjust Group Node Size
AdjustGroupNodeSizeAdjust Group Node Size
AdjustGroupNodeSizeKeyControl+Shift+G
AdjustToSizeConstraints.RedoNameAdjust Node Size
AdjustToSizeConstraints.UndoNameAdjust Node Size
BeginEdgeCreationCreate Edge
CollapseGroupCollapse Group
CollapseGroupKeyAlt+Left
CollapseNode.RedoNameCollapse Node
CollapseNode.UndoNameExpand Node
CopyCopy
CopyKeyControl+C, ⌘+C, Control+Insert
CreateEdge.RedoNameAdd Edge
CreateEdge.UndoNameRemove Edge
CreateNode.RedoNameAdd Node
CreateNode.UndoNameRemove Node
CreateStripe.RedoNameAdd Stripe
CreateStripe.UndoNameRemove Stripe
Cut.RedoNameRedo Cut
Cut.UndoNameUndo Cut
CutCut
CutKeyControl+X, ⌘+X, Shift+Delete
DecreaseZoomZoom Out
DecreaseZoomKeyControl+Minus, ⌘+Minus
DeleteDelete
DeleteKeyDelete, Backspace
DeleteSelection.RedoNameRedo Delete
DeleteSelection.UndoNameUndo Delete
DeselectAllDeselect All
DeselectAllKeyControl+Shift+A, ⌘+Shift+A
DeselectItemDeselect Item
DuplicateDuplicate
Duplicate.RedoNameRedo Duplicate
Duplicate.UndoNameUndo Duplicate
DuplicateKeyControl+D, ⌘+D
EditLabelEdit Label
EditLabelKeyF2, Enter
EnterGroupEnter Group
EnterGroupKeyAlt+ArrowDown
ExitGroupExit Group
ExitGroupKeyAlt+ArrowUp
ExpandGroupExpand Group
ExpandGroupKeyAlt+ArrowRight
ExpandNode.RedoNameExpand Node
ExpandNode.UndoNameCollapse Node
ExtendSelectionDownExtend Selection Down
ExtendSelectionDownKeyShift+ArrowDown
ExtendSelectionLeftExtend Selection Left
ExtendSelectionLeftKeyShift+ArrowLeft
ExtendSelectionRightExtend Selection Right
ExtendSelectionRightKeyShift+ArrowRight
ExtendSelectionUpExtend Selection Up
ExtendSelectionUpKeyShift+ArrowUp
FitContentFit Content
FitGraphBoundsFit Graph Bounds
FitGraphBoundsKeyAlt+1
GroupSelectionGroup Selection
GroupSelectionKeyControl+G, ⌘+G
IncreaseZoomZoom In
IncreaseZoomKeyControl+Plus
LowerLower
Lower.RedoNameLower
Lower.UndoNameLower
Move.RedoNameMove Items
Move.UndoNameMove Items
MoveDownMove Down
MoveDownKeyArrowDown
MoveFocusLeftMove Focus Left
MoveFocusLeftKeyControl+ArrowLeft, ⌘+ArrowLeft
MoveFocusDownMove Focus Down
MoveFocusDownKeyControl+ArrowDown, ⌘+ArrowDown
MoveFocusRightMove Focus Right
MoveFocusRightKeyControl+ArrowRight, ⌘+ArrowRight
MoveFocusUpMove Focus Up
MoveFocusUpKeyControl+ArrowUp, ⌘+ArrowUp
MoveHandle.RedoNameMove Handle
MoveHandle.UndoNameMove Handle
MoveLeftMove Left
MoveLeftKeyArrowLeft
MoveRightMove Right
MoveRightKeyArrowRight
MoveToPageDownMove Page Down
MoveToPageDownKeyPageDown
MoveToPageUpMove Page Up
MoveToPageUpKeyPageUp
MoveUpMove Up
MoveUpKeyArrowUp
NewNew
NewKeyControl+N, ⌘+N
NodeDropInputMode.NodeDropped.RedoNameAdd Node
NodeDropInputMode.NodeDropped.UndoNameRemove Node
OpenOpen
OpenFileFailed.CaptionError Loading File
OpenFileFailed.MessageThere was a problem during the loading of the file.
Paste.RedoNameRedo Paste
Paste.UndoNameUndo Paste
PastePaste
PasteKeyControl+V, ⌘+V, Shift+Insert
PrintPrint
PrintKeyControl+P, ⌘+P
PrintPreviewPrintPreview
PrintPreviewKeyControl+F2
RaiseRaise
Raise.RedoNameRaise
Raise.UndoNameRaise
RedoRedo
RedoKeyControl+Y, ⌘+Y, Control+Shift+Z, ⌘+Shift+Z
RemoveBend.RedoNameRemove Bend
RemoveBend.UndoNameAdd Bend
RemoveEdge.RedoNameRemove Edge
RemoveEdge.UndoNameAdd Edge
RemoveLabel.RedoNameRemove Label
RemoveLabel.UndoNameAdd Label
RemoveNode.RedoNameRemove Node
RemoveNode.UndoNameAdd Node
RemovePort.RedoNameRemove Port
RemovePort.UndoNameAdd Port
RemoveStripe.RedoNameRemove Stripe
RemoveStripe.UndoNameAdd Stripe
ReparentStripe.RedoNameReparent Stripe
ReparentStripe.UndoNameReparent Stripe
ResizeNode.RedoNameResize Node
ResizeNode.UndoNameResize Node
ReverseEdgeReverse Edge
ReverseEdge.RedoNameReverse Edge
ReverseEdge.UndoNameReverse Edge
ReverseEdgeKey.UndoNameControl+R, ⌘+R
SaveSave
SaveAsSave As…​
SaveFileFailed.CaptionError Saving File
SaveFileFailed.MessageThere was a problem during the saving of the file.
ScrollPageDownScroll Page Down
ScrollPageDownKeyPageDown
ScrollPageLeftScroll Page Left
ScrollPageRightScroll Page Right
ScrollPageUpScroll Page Up
ScrollPageUpKeyPageUp
SelectAllSelect All
SelectAllKeyControl+A, ⌘+A
SelectItemSelect Item
SetCurrentItemSet Current Item
SetEdgePorts.RedoNameReconnect Edge
SetEdgePorts.UndoNameReconnect Edge
SetEdgeStyle.RedoNameChange Edge Style
SetEdgeStyle.RedoNameChange Edge Style
SetEdgeStyle.UndoNameChange Edge Style
SetIsNoGroupNode.RedoNameConvert Back to Group Node
SetIsNoGroupNode.UndoNameConvert to Normal Node
SetIsGroupNode.RedoNameConvert Back to Normal Node
SetIsGroupNode.UndoNameConvert to Group Node
SetLabelLayoutParameter.RedoNameChange Label Position
SetLabelLayoutParameter.UndoNameChange Label Position
SetLabelStyle.RedoNameChange Label Style
SetLabelStyle.UndoNameChange Label Style
SetLabelText.RedoNameChange Label Text
SetLabelText.UndoNameChange Label Text
SetLeaf.RedoNameConvert Back to Group Node
SetLeaf.UndoNameConvert to Normal Node
SetPortLocationParameter.RedoNameChange Port Location
SetPortLocationParameter.UndoNameChange Port Location
SetNodeStyle.RedoNameChange Node Style
SetNodeStyle.UndoNameChange Node Style
SetNonLeaf.RedoNameConvert Back to Normal Node
SetNonLeaf.UndoNameConvert to Group Node
SetParent.RedoNameChange Parent
SetParent.UndoNameChange Parent
SetPorts.RedoNameReconnect Edge
SetPorts.UndoNameReconnect Edge
SetPortStyle.RedoNameChange Port Style
SetPortStyle.UndoNameChange Port Style
SetPreferredLabelSize.RedoNameChange Preferred Label Size
SetPreferredLabelSize.UndoNameChange Preferred Label Size
SetStripePadding.RedoNameChange Stripe Padding
SetStripePadding.UndoNameChange Stripe Padding
SetStripeMinimumSize.RedoNameChange Minimum Stripe Size
SetStripeMinimumSize.UndoNameChange Minimum Stripe Size
SetStripeSize.RedoNameChange Stripe Size
SetStripeSize.UndoNameChange Stripe Size
SetStripeStyle.RedoNameChange Stripe Style
SetStripeStyle.UndoNameChange Stripe Style
TagChange.RedoNameChange Tag
TagChange.UndoNameChange Tag
ToBackToBack
ToBack.RedoNameToBack
ToBack.UndoNameToBack
ToFrontToFront
ToFront.RedoNameToFront
ToFront.UndoNameToFront
ToggleExpansionStateToggle Group State
ToggleExpansionStateKeyAlt+Shift+ArrowLeft, Alt+Shift+ArrowRight
ToggleItemSelectionToggle Selection
ToggleItemSelectionKeyControl+Space
UnavailableUnavailable
UndoUndo
UndoKeyControl+Z, ⌘+Z
UngroupSelectionUngroup Selection
UngroupSelectionKeyControl+U, ⌘+U
UpdateContentBoundsUpdate Content Bounds
ZoomZoom
ZoomToCurrentItemZoom To Current Item
ZoomToSelectionZoom To The Selected Items
ZoomToSelectionKeyAlt+2
Zoom 100%Zoom
ZoomKeyControl+0, ⌘+0

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.