Commit Graph

26 Commits

Author SHA1 Message Date
Nick O'Leary efecfa328b
Fix up event handling when deleting groups and tabs 2020-06-03 14:23:26 +01:00
Nick O'Leary 95d1b7bc36
Merge branch 'dev' into pr_2570 2020-05-27 11:52:37 +01:00
cinhcet 64b3c11682 debug nodes in subflows are ignored and changed name of callback to callback 2020-05-19 18:00:03 +02:00
cinhcet a6a781f67c fix debug undo/redo by introducing a sideEffectCallback in history object 2020-05-19 13:51:08 +02:00
Nick O'Leary 373267c53b
Add more consistent events in the editor
This introduces a much more consistent set of events within the editor
for whenever a element is added, removed or modified.

The events emited on the `RED.events` event system. The event names
take the form: `"<thing>:<action>"`.

`<thing>` can be one of:
 - nodes
 - flows
 - subflows
 - groups
 - links

`<action>` can be one of:
 - add
 - remove
 - change

The payload of the events is the object in question.

There is also:
 - flows:reorder    - when tabs are reordered. Payload is array of flow ids.
 - workspace:clear  - when the workspace is emptied - part of switching projects

The `nodes:change` event was already used by RED.nodes.dirty() to cause
the Deploy button to become active. This renames that event to:
 - workspace:dirty  - Payload is boolean flag for the dirty state

This commit also updates the Palette to use the subflows:change event to
only redraw subflows that have actually changed rather than refresh them
all whenever one of them *might* have changed. This removes a noticable
flicker of the icon which was needlessly being redrawn.
2020-04-20 22:23:34 +01:00
Nick O'Leary 1bdbd31b96
[groups] Overhaul group drag handling for empty groups 2020-03-26 15:27:34 +00:00
Nick O'Leary 7bc3b662e4
[groups] Fix up various delete/undo actions with groups 2020-03-24 14:05:09 +00:00
Nick O'Leary 9b2e9ec41a
[groups] Support undo of convert to subflow from inside group 2020-03-16 22:51:54 +00:00
Nick O'Leary 1bf3b3077e
[groups] Include groups when converting selection to subflow 2020-03-14 00:17:16 +00:00
Nick O'Leary c9194c3635
[groups] Fix undo/redo handling of addTo/removeFrom group 2020-03-13 23:09:18 +00:00
Nick O'Leary 7886e5d57c
[groups] Add undo support for group actions 2020-03-13 23:01:01 +00:00
Nick O'Leary 0ef3471f8f
[groups] Add undo of group import 2020-03-13 11:27:13 +00:00
Nick O'Leary 88cbc32abc
Fix inverse of 'replace' editor event 2019-11-14 19:13:23 +00:00
Nick O'Leary c8acc6a12e
Fix redo of subflow create 2019-08-12 14:51:01 +01:00
Kunihiko Toumura b749a27f86 Eliminate snake_case and use camelCase, and change assignment of keyboard shortcut 2019-08-05 10:20:46 +09:00
Kunihiko Toumura c4e8756210 merge upstream changes 2019-08-02 15:15:30 +09:00
Hiroyasu Nishiyama cbce9b8637 fix undo handling & typo 2019-07-30 11:07:55 +09:00
Kunihiko Toumura 2254e4c57e minor fix (add semicolon) 2019-07-17 09:12:47 +09:00
Kunihiko Toumura 94c9da468e fix initialization bug 2019-07-04 08:26:39 +01:00
Kunihiko Toumura 7adf102d8d Initial implementation of redo (un-undo) 2019-06-22 16:05:50 +09:00
Nick O'Leary 4cd6e20c91
Fix undo of flow disable state change 2019-06-07 15:13:49 +01:00
Nick O'Leary 3bcff91328
Add Status Node to Subflow to allow subflow-specific status
Closes #597
2019-02-01 23:44:50 +00:00
Nick O'Leary 79062e2034
Move nodes to top-left corner when converting to subflow 2019-01-26 20:49:22 +00:00
Nick O'Leary 33dade0584
Support drag-wiring of link nodes 2018-12-18 10:57:53 +00:00
Nick O'Leary c0d8f904b3
Support ctrl-click selection of flow tabs 2018-10-30 22:18:16 +00:00
Nick O'Leary e57d8ba0ef
pull out editor-client and editor-api 2018-08-17 22:10:54 +01:00