-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathconnectionsWidth.js
39 lines (36 loc) · 939 Bytes
/
connectionsWidth.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/**
* Coded with love by Failfa.st
* LICENSE: AGPL 3.0
* https://github.com/failfa-st/failfast-comfyui-extensions/blob/main/LICENSE
*
* Visit https://github.com/failfa-st/failfast-comfyui-extensions for more info
*
* Homepage: https://failfa.st
* GitHub: https://github.com/failfa-st
* Discord: https://discord.com/invite/m3TBB9XEkb
*/
import { app } from "/scripts/app.js";
/**
* Connections Width
*/
const connectionsWidthName = "Failfast.connectionsWidth";
app.registerExtension({
name: connectionsWidthName,
async init(app) {
app.ui.settings.addSetting({
id: connectionsWidthName,
name: "Connectors Width",
type: "slider",
attrs: {
min: 2,
max: 8,
},
tooltip: "The width of connector lines.",
defaultValue: 3,
onChange(value) {
app.canvas.connections_width = +value;
app.graph.setDirtyCanvas(true, true);
},
});
},
});