Commit Graph

598 Commits

Author SHA1 Message Date
atlasan
edfcc5ccbf Fixes and cleaning
- broken missing LGraph.nodes_executing and nodes_actioning

- fix detect location for in out buttons in subgraph

- clean debugs
2021-10-09 18:48:45 +02:00
atlasan
95e10bd80e some cleaning 2021-10-09 12:42:46 +02:00
atlasan
662817ecbd Cleaning and LOST CHANGES 2021-10-09 12:34:56 +02:00
atlasan
275e55eff1 Styles: Integrations and fixes 2021-10-09 11:52:22 +02:00
atlasan
719a74a0d8 Integration and Fixes
- few new nodes
- onAction, onExecute, onTrigger has the third parameters for additional
options
- onAction has to refresh the getInputData values for future behaviours
- prefer 0 or "*" for slot type instead of empty string ""
2021-10-09 11:51:07 +02:00
atlasan
b337cd07ef Many improvements and implementations, TEST EM
- allow connecting from IN to OUT (drag an IN slot to create a link to
OUT slots)

- dim (opacity) uncompatible slots while creating a link

- filter in the searchbox for types (slotsIn, slotsOut), autofilter when
chaining

- drag-shift a slot to search and connect a new node

- code widget re-enabled

- properties panel improvements

- paste will use mouse coordinates


:: properties and methods ::
- additional shape GRID_SHAPE intended for slot arrays
- NODE_MODES_COLORS array of colors based on the node modes

node_box_coloured_by_mode: false, // [true!] nodebox colored on node
mode, visual feedback
node_box_coloured_when_on: false, // [true!] this make the nodes box
(top left circle) coloured when triggered (execute/action), visual
feedback

dialog_close_on_mouse_leave: true, // better true if not touch device
dialog_close_on_mouse_leave_delay: 500,

shift_click_do_break_link_from: false, // [false!] prefer false if
results too easy to break links - TODO custom keys
click_do_break_link_to: false, // [false!] prefer false, way too easy to
break links

search_hide_on_mouse_leave: true, // better true if not touch device
search_filter_enabled: true, // [true!] enable filtering slots type in
the search widget, !requires auto_load_slot_types
search_show_all_on_open: true, // [true!] opens the results list when
opening the search widget

auto_load_slot_types: true, // [if want false, use true, run, get vars
values to be statically set, than disable] nodes types and nodeclass
association with node types need to be calculated, if dont want this,
calculate once and set registered_slot_[in/out]_types and
slot_types_[in/out]
- this will create (without adding it) a node for each class when they
are registered. This allows for slots checking. Could raise errors in
case some node miss something: somehow nice.


alt_drag_do_clone_nodes: false, // [true!] very handy, ALT click to
clone and drag the new node

do_add_triggers_slots: false, // [true!] will create and connect event
slots when using action/events connections, !WILL CHANGE node mode when
using onTrigger (enable mode colors), onExecuted does not need this

allowMultiOutputForEvents: true, // [false!] being events, it is
strongly reccomended to use them sequentually, one by one


- find(Input/Output)Slot functions can return the object instead

- connectByType - allow connecting a node slot to a target node using an
auto-slot mode that looks for the right types

- onNodeCreated - new callback

- addOnTriggerInput, addOnExecutedOutput - creates action slots
(triggerIn, executedOut) when needed (changing mode, dragging events
onto the node)

- doExecute and doAction - wraps the onExecute and onAction node
functions with helpers and checks

- onAfterExecuteNode - new callback

- onBeforeConnectInput - new callback, can change slot while connecting
(or create a new one)

- onConnectOutput - new callback, similar to onConnectInput

- onNodeInputAdd, onNodeOutputAdd - new callbacks

- isOverNodeOutput - similar to isOverNodeInput

- helpers findInput, findOutput, findInputSlotFree, findOutputSlotFree,
findSlotByType

- canvas default_connection_color_byType[Off] allows custom colors type
based

- ESC will close panels

- showConnectionMenu will show the "Add menu" while dragging, to connect
after creation
2021-10-09 11:34:33 +02:00
atlasan
a3055c7fcb Couple implementations
- matrix shape (enabled for array slots)
- dim opacity on incompatibile slots when dragging
2021-10-06 17:43:48 +02:00
Javi Agenjo
ef8b86bd37 Merge pull request #261 from atlasan/pulls
Touch events - alpha version
2021-10-04 16:33:53 +02:00
atlasan
ad9611ce4f Helper pointerListener(Add/Remove)
- moved from LGCanvas to LiteGraph to allow contextmenu and others to
access it easily
2021-10-03 20:29:09 +02:00
atlasan
4c9c1c60bb FIX: css touch-action
ensure to put this to make touch working
2021-10-03 18:12:46 +02:00
atlasan
8d302bd4f9 Simulate right click by multiple fingers 2021-10-02 16:33:50 +02:00
atlasan
b793e5c1d5 remove console.log for pointerevents 2021-10-02 14:29:38 +02:00
atlasan
a66d822e2a PointerEvents: from mouse events to pointer events v1
added LiteGraph.pointerevents_method with default "pointer"
replaced EventListeners with pointerevents_method+"down", "up", etc..
replaced e.localX (and Y) for e.clientX (Y)
fixed e.clientX is not writable

TODO: finish checks and clean
version with console.log("pointerevents..) enabled
alpha working for mobile, touch enabled
2021-10-02 14:26:15 +02:00
atlasan
d3d2586039 First easy fix to touch integration: 2021-10-01 17:02:11 +02:00
tamat
9ad6301101 make removable slots only the ones created from editor 2021-09-16 11:25:32 +02:00
tamat
c2f7e389b9 little fix 2021-08-25 13:46:36 +02:00
tamat
fcf37260ad added semaphore node 2021-08-25 12:59:54 +02:00
tamat
9cab33f33c Merge branch 'master' of https://github.com/jagenjo/litegraph.js 2021-08-17 10:29:21 +02:00
tamat
136c627c3c fixes with roundrect 2021-08-17 10:00:09 +02:00
Javi Agenjo
88aeee4e15 Update README.md 2021-08-17 09:13:03 +02:00
Javi Agenjo
d0e8e41390 Merge pull request #242 from turkron/master
changed the auto sort function to make the function es5 compliant as …
2021-08-16 17:12:08 +02:00
Javi Agenjo
334868c84d Merge pull request #247 from Eikeike/RenderTitleFix
Add functionality for title mode NO_TITLE
2021-08-16 17:11:02 +02:00
Javi Agenjo
91c9ffbca3 Merge pull request #248 from kiddoinpyjamas/warning_even_with_debug_disabled
Fix to only show console warn if debug is enabled
2021-08-16 17:08:51 +02:00
tamat
f71aad4450 fixes' 2021-08-16 17:00:48 +02:00
tamat
667b04f62a replaced old roundRect function 2021-08-16 16:45:36 +02:00
Lucas do Nascimento
4942990424 Fix to only show console warn if debug is enabled 2021-08-06 22:30:10 -03:00
Eike Michel Wobken
1a10cce69d Add functionality for title mode NO_TITLE 2021-07-30 18:49:04 +02:00
Javi Agenjo
bf9034362d Merge pull request #245 from Eikeike/RenderTitleFix
Separator only drawn when title is drawn
2021-07-30 13:17:47 +02:00
Eike Michel Wobken
0f55726252 Separator only drawn when title is drawn 2021-07-30 13:02:44 +02:00
Javi Agenjo
6f00e44e6a Merge pull request #244 from gausszhou/master
Hi i fixed subgraph the problem of the subgraph
2021-07-29 11:27:47 +02:00
Gauss Zhou
b97b40cf3d Update litegraph.css 2021-07-29 11:57:39 +08:00
周存根
94ee0d57d0 Merge branch 'master' of github.com:gausszhou/litegraph.js into master 2021-07-29 11:41:24 +08:00
周存根
3f4666b4e6 fixed subgraph 2021-07-29 11:39:30 +08:00
Nathan Kendall
7ccd907f71 changed the auto sort function to make the function es5 compliant as the rest of the project is already 2021-07-26 10:23:09 +01:00
tamat
0a21262238 build 2021-07-12 17:03:12 +02:00
tamat
998de17038 Merge branch 'master' of https://github.com/jagenjo/litegraph.js 2021-07-12 17:02:29 +02:00
tamat
18e53d8788 minor fix 2021-07-12 17:02:22 +02:00
Javi Agenjo
4e524ac3ae Merge pull request #235 from Eikeike/arrow_shape_fix
Highlight arrow shape when connecting slots with arrow shape
2021-07-08 18:19:13 +02:00
Eike Michel Wobken
3eb9533ad2 Highlight arrow shape when connecting slots with arrow shape 2021-07-08 17:05:37 +02:00
tamat
bdad111eb0 Merge branch 'master' of https://github.com/jagenjo/litegraph.js 2021-07-02 17:11:08 +02:00
tamat
63d1506efa fixed touch 2021-07-02 17:10:49 +02:00
Javi Agenjo
bfaafe9526 Merge pull request #232 from sfranzyshen/git-address
Update README.md
2021-06-21 13:19:27 +02:00
Javi Agenjo
6e8dd97bf1 Merge pull request #230 from RobTheFiveNine/bugfix/buttons-register-two-clicks
Fix widget buttons registering clicks twice
2021-06-21 13:18:18 +02:00
Scotty Franzyshen
7d7f5dc8bd Update README.md
Update Git Address
2021-06-15 10:05:32 -07:00
RobTheFiveNine
d0eedf7232 Fix widget buttons registering clicks twice 2021-06-15 14:37:17 +01:00
Javi Agenjo
40907189f3 Merge pull request #229 from RobTheFiveNine/bugfix/incorrect-property-editor-labels
Fix incorrect property editor labels + build improvements
2021-06-14 16:42:41 +02:00
RobTheFiveNine
7017bd31ed Fix bug causing property labels not to be used when creating widgets 2021-06-14 14:42:58 +01:00
RobTheFiveNine
5717013478 Add a build target that includes only the core library 2021-06-14 14:41:26 +01:00
RobTheFiveNine
042379fdff Change builder to use the compiler local to the repo 2021-06-14 14:40:46 +01:00
Javi Agenjo
781f9ae049 Merge pull request #200 from ralphwetzel/master
Fix type definitions
2021-06-14 12:26:55 +02:00