mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 19:11:13 +00:00
feat(editor): Make workflows, credentials, executions and new canvas usable on mobile and touch devices (#12372)
This commit is contained in:
@@ -93,7 +93,7 @@ const props = withDefaults(
|
||||
},
|
||||
);
|
||||
|
||||
const { controlKeyCode } = useDeviceSupport();
|
||||
const { isMobileDevice, controlKeyCode } = useDeviceSupport();
|
||||
|
||||
const vueFlow = useVueFlow({ id: props.id, deleteKeyCode: null });
|
||||
const {
|
||||
@@ -143,9 +143,10 @@ const disableKeyBindings = computed(() => !props.keyBindings);
|
||||
/**
|
||||
* @see https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values#whitespace_keys
|
||||
*/
|
||||
const panningKeyCode = ref<string[]>([' ', controlKeyCode]);
|
||||
const panningMouseButton = ref<number[]>([1]);
|
||||
const selectionKeyCode = ref<true | null>(true);
|
||||
|
||||
const panningKeyCode = ref<string[] | true>(isMobileDevice ? true : [' ', controlKeyCode]);
|
||||
const panningMouseButton = ref<number[] | true>(isMobileDevice ? true : [1]);
|
||||
const selectionKeyCode = ref<string | true | null>(isMobileDevice ? 'Shift' : true);
|
||||
|
||||
onKeyDown(panningKeyCode.value, () => {
|
||||
selectionKeyCode.value = null;
|
||||
|
||||
Reference in New Issue
Block a user