Add setting to enable Litegraph trackpad gestures (#3751)

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
filtered
2025-05-04 14:31:43 +10:00
committed by GitHub
parent 77ac4a415c
commit 6601cf6959
11 changed files with 48 additions and 1 deletions

View File

@@ -122,4 +122,10 @@ export const useLitegraphSettings = () => {
'LiteGraph.Reroute.SplineOffset'
)
})
watchEffect(() => {
LiteGraph.macTrackpadGestures = settingStore.get(
'LiteGraph.Pointer.TrackpadGestures'
)
})
}

View File

@@ -817,5 +817,16 @@ export const CORE_SETTINGS: SettingParams[] = [
type: 'boolean',
defaultValue: false,
versionAdded: '1.18.0'
},
{
id: 'LiteGraph.Pointer.TrackpadGestures',
category: ['LiteGraph', 'Pointer', 'Trackpad Gestures'],
experimental: true,
name: 'Enable trackpad gestures',
tooltip:
'This setting enables trackpad mode for the canvas, allowing pinch-to-zoom and panning with two fingers.',
type: 'boolean',
defaultValue: false,
versionAdded: '1.19.1'
}
]

View File

@@ -387,6 +387,10 @@
"LiteGraph_Node_TooltipDelay": {
"name": "Tooltip Delay"
},
"LiteGraph_Pointer_TrackpadGestures": {
"name": "Enable trackpad gestures",
"tooltip": "This setting enables trackpad mode for the canvas, allowing pinch-to-zoom and panning with two fingers."
},
"LiteGraph_Reroute_SplineOffset": {
"name": "Reroute spline offset",
"tooltip": "The bezier control point offset from the reroute centre point"

View File

@@ -387,6 +387,10 @@
"LiteGraph_Node_TooltipDelay": {
"name": "Retraso de la información sobre herramientas"
},
"LiteGraph_Pointer_TrackpadGestures": {
"name": "Habilitar gestos del trackpad",
"tooltip": "Esta configuración activa el modo trackpad para el lienzo, permitiendo hacer zoom con pellizco y desplazar con dos dedos."
},
"LiteGraph_Reroute_SplineOffset": {
"name": "Desvío de la compensación de la spline",
"tooltip": "El punto de control bezier desplazado desde el punto central de reenrutamiento"

View File

@@ -387,6 +387,10 @@
"LiteGraph_Node_TooltipDelay": {
"name": "Délai d'infobulle"
},
"LiteGraph_Pointer_TrackpadGestures": {
"name": "Activer les gestes du trackpad",
"tooltip": "Ce paramètre active le mode trackpad pour le canevas, permettant le zoom par pincement et le déplacement à deux doigts."
},
"LiteGraph_Reroute_SplineOffset": {
"name": "Réacheminement décalage de spline",
"tooltip": "Le point de contrôle de Bézier est décalé par rapport au point central de réacheminement"

View File

@@ -387,6 +387,10 @@
"LiteGraph_Node_TooltipDelay": {
"name": "ツールチップ遅延"
},
"LiteGraph_Pointer_TrackpadGestures": {
"name": "トラックパッドジェスチャーを有効にする",
"tooltip": "この設定を有効にすると、キャンバスでトラックパッドモードが有効になり、ピンチズームや2本指でのパン操作が可能になります。"
},
"LiteGraph_Reroute_SplineOffset": {
"name": "リルートスプラインオフセット",
"tooltip": "リルート中心点からのベジエ制御点のオフセット"

View File

@@ -387,6 +387,10 @@
"LiteGraph_Node_TooltipDelay": {
"name": "툴팁 지연"
},
"LiteGraph_Pointer_TrackpadGestures": {
"name": "트랙패드 제스처 활성화",
"tooltip": "이 설정을 켜면 캔버스에서 트랙패드 모드를 사용할 수 있으며, 두 손가락으로 확대/축소 및 이동이 가능합니다."
},
"LiteGraph_Reroute_SplineOffset": {
"name": "경유점 스플라인 오프셋",
"tooltip": "경유점 중심에서 베지어 제어점까지의 오프셋"

View File

@@ -387,6 +387,10 @@
"LiteGraph_Node_TooltipDelay": {
"name": "Задержка всплывающей подсказки"
},
"LiteGraph_Pointer_TrackpadGestures": {
"name": "Включить жесты трекпада",
"tooltip": "Эта настройка включает режим трекпада для холста, позволяя использовать масштабирование щипком и панорамирование двумя пальцами."
},
"LiteGraph_Reroute_SplineOffset": {
"name": "Перераспределение смещения сплайна",
"tooltip": "Смещение контрольной точки Безье от центральной точки перераспределения"

View File

@@ -387,6 +387,10 @@
"LiteGraph_Node_TooltipDelay": {
"name": "工具提示延迟"
},
"LiteGraph_Pointer_TrackpadGestures": {
"name": "启用触控板手势",
"tooltip": "此设置为画布启用触控板模式,允许使用双指捏合缩放和拖动。"
},
"LiteGraph_Reroute_SplineOffset": {
"name": "重新路由样条偏移",
"tooltip": "贝塞尔控制点从重新路由中心点的偏移"

View File

@@ -456,7 +456,8 @@ const zSettings = z.object({
'test.setting': z.any(),
'main.sub.setting.name': z.any(),
'single.setting': z.any(),
'LiteGraph.Node.DefaultPadding': z.boolean()
'LiteGraph.Node.DefaultPadding': z.boolean(),
'LiteGraph.Pointer.TrackpadGestures': z.boolean()
})
export type EmbeddingsResponse = z.infer<typeof zEmbeddingsResponse>

View File

@@ -760,6 +760,7 @@ export class ComfyApp {
this.ctx = canvasEl.getContext('2d')
LiteGraph.alt_drag_do_clone_nodes = true
LiteGraph.macGesturesRequireMac = false
this.graph.start()