Перейти к основному содержимому

addShortcut

Description

Добавляет новое сочетание клавиш

addShortcut: (shortcut: string, handler: GanttCallback, scope?: string) => void

Parameters

  • shortcut - (required) string - имя клавиши или имя сочетания клавиш для shortcut shortcut syntax
  • handler - (required) function - обработчик вызова сочетания клавиш

Example

gantt.addShortcut("shift+w", function(e){ 
var task = gantt.locate(e);
if(task)
gantt.showQuickInfo(task)
},"taskRow");

Details

заметка

Этот метод определяется в расширении keyboard_navigation, поэтому необходимо активировать плагин keyboard_navigation. Подробности смотрите в статье Keyboard Navigation.

Добавлено в версии 4.1

Если третий параметр не задан, обработчик будет привязан к контексту gantt.

Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.