You've already forked DataMate
feat(annotation): 添加保存并跳转快捷键功能
- 实现了 Ctrl+Enter 保存并跳转到下一个标注的快捷键逻辑 - 添加了键盘事件监听器来捕获快捷键组合 - 集成了导出选中标注并发送到父窗口的功能 - 处理了快捷键事件的防重复和传播阻止 - 在消息处理器中添加了 LS_SAVE_AND_NEXT 类型的支持 - 实现了自动跳转到下一项标注的功能
This commit is contained in:
@@ -865,6 +865,12 @@ export default function LabelStudioTextEditor() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (msg.type === "LS_SAVE_AND_NEXT") {
|
||||
pendingAutoAdvanceRef.current = false;
|
||||
saveFromExport(payload, { autoAdvance: true });
|
||||
return;
|
||||
}
|
||||
|
||||
if (msg.type === "LS_EXPORT_CHECK_RESULT") {
|
||||
const pending = exportCheckRef.current;
|
||||
if (!pending) return;
|
||||
|
||||
Reference in New Issue
Block a user