1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00
Commit Graph

233 Commits

Author SHA1 Message Date
Nick O'Leary
46e2ff1001
Allow tabs to be hidden 2021-08-26 12:06:15 +01:00
Nick O'Leary
5ba0588c7b
Merge branch 'master' into dev 2021-07-16 08:53:35 +01:00
Nick O'Leary
d4a199f0e1
Avoid prototype pollution in RED.view.calculateTextDimensions 2021-07-16 08:52:00 +01:00
Nick O'Leary
844bf29de1
Add RED.view.annotations api 2021-06-24 17:40:26 +01:00
Nick O'Leary
e9e64f6a44
Add option to RED.nodes.createCompleteNodeSet to include node dimensions
This allows the linter to use a flow json with more than just position
information.
2021-06-04 13:53:01 +01:00
Nick O'Leary
c47b553a8e
Add viewAddPort viewRemovePort viewAddNode viewRemoveNode hooks to view 2021-05-13 13:36:50 +01:00
Nick O'Leary
e641b0a965
Fix scaling issues when dragging nodes into scaled workspace 2021-05-10 21:03:27 +01:00
Nick O'Leary
8e7efd98b2
Don't let 'escape' whilst moving nodes interrupt things
Fixes #2960
2021-04-26 16:48:21 +01:00
Nick O'Leary
0b39ef68d9
Use cursor keys to change selection in workspace 2021-03-10 14:04:47 +00:00
Nick O'Leary
2fa50e458f
Fix select up/down stream when zoomed in or out 2021-03-09 00:37:01 +00:00
Nick O'Leary
9c7db1381c
Add core:go-to-selected-subflow action 2021-03-06 23:28:20 +00:00
Nick O'Leary
2d4f5b8603
Ctrl-dbclick on subflow node opens subflow tab 2021-03-06 23:21:16 +00:00
Nick O'Leary
15715a2968
Ensure select-up/down-stream action follows branches in flows 2021-03-03 14:20:55 +00:00
Nick O'Leary
ca75efcbaf
Adds shift-click support for selecting up/down stream nodes 2021-02-17 17:32:55 +00:00
Hiroyasu Nishiyama
34ef055d7b
Fix line break of subflow label on palette (#2828)
* fix line break of subflow label on palette

* handle line break on palette
2021-01-27 20:32:15 +00:00
Dave Conway-Jones
65d90a6dff
Add gray/grey alternate options for status 2020-11-05 09:20:47 +00:00
Hiroyasu Nishiyama
9bfe8ac007 fix selection of link node not existing within active workspace 2020-10-12 20:16:21 +09:00
Nick O'Leary
a48f0827ae
Detect importing duplicate nodes and help user resolve 2020-09-16 11:59:13 +01:00
Nick O'Leary
7bd0ca2212
Handle nodes with invalid z property
Closes #2170
2020-09-03 18:31:33 +01:00
Nick O'Leary
02c20e97b7
Only recalculate group label offsets when needed 2020-09-03 13:49:42 +01:00
Nick O'Leary
d9900d8e4c
Fix copy/paste of node into active group
Fixes #2686
2020-09-03 13:12:08 +01:00
Nick O'Leary
85edee288f
Allow lasso selection to be restricted to active group 2020-08-05 11:16:53 +01:00
Nick O'Leary
1aa494a97a
Make ctrl-click on nexted group more intuitive 2020-08-05 10:38:14 +01:00
Nick O'Leary
a8e7627184
Support select-all inside active group 2020-08-04 21:01:08 +01:00
Nick O'Leary
758f44e25f
Improve performance of moving groups 2020-07-31 23:22:33 +01:00
Nick O'Leary
580cc00967
Fix all the touch screen issues 2020-07-10 16:00:38 +01:00
Nick O'Leary
612c565cfd
Add RED.view.redrawStatus to avoid full redraw on update 2020-07-10 16:00:18 +01:00
Nick O'Leary
1c337f6817
Fix connecting wires to subflow status or io ports on touchscreen 2020-07-08 13:22:26 +01:00
Nick O'Leary
f5e46a663a
Remove hardcoded css and allow group to default from theme
Fixes #2633
2020-07-07 11:01:05 +01:00
Nick O'Leary
64ec415a54
Add RED.view.DEBUG_SYNC_REDRAW to disable requestAnimationFrame
References #2631
2020-07-06 21:01:14 +01:00
Nick O'Leary
0243a902b2
Fix up subflow port wiring 2020-07-06 18:11:47 +01:00
Nick O'Leary
6c04402a98
Prevent wiring to node with no corresponding port
Fixes #2641
2020-07-06 17:32:44 +01:00
Nick O'Leary
73448a6039
Avoid copying duplicate nodes to internal clipboard 2020-07-06 16:00:15 +01:00
Nick O'Leary
44da085e0b
Tweak group margin to fit node status and look better 2020-06-29 20:43:25 +01:00
Nick O'Leary
0a411cbe4f
Fix node button mouse pointer css 2020-06-22 14:37:52 +01:00
Nick O'Leary
581f71911a
Change node linebreak handling to use "\n " 2020-06-22 13:08:35 +01:00
Nick O'Leary
e548bf8bc2
Handle import of node with non-default number of outputs 2020-06-22 10:43:09 +01:00
Nick O'Leary
6f407750f5
Fix clearing group label 2020-06-18 22:25:00 +01:00
Nick O'Leary
68d3cc7507
Fix node toggle button initial opacity 2020-06-18 10:18:35 +01:00
Nick O'Leary
e2c86c4b96
Fix wiring nodes from input back to output 2020-06-17 10:52:41 +01:00
Nick O'Leary
9ce5210c33
Handle unknown nodes with no icon 2020-06-16 20:34:45 +01:00
Nick O'Leary
4dd68452b4
Prevent node creep when switching tabs 2020-06-16 20:23:18 +01:00
Nick O'Leary
aebb7da3c7
Fix deleting node in group after changing selection 2020-06-16 10:54:50 +01:00
Nick O'Leary
ebca8c0217
Increase group margin to avoid clash with status text 2020-06-14 23:44:26 +01:00
Nick O'Leary
752a080876
Fix event order when quick-adding node to group 2020-06-14 23:44:01 +01:00
Nick O'Leary
61d9ccf263
Avoid regenerating every node label on redraw 2020-06-13 23:02:10 +01:00
Hiroyasu Nishiyama
1c30584153 fix code indentation 2020-06-13 23:33:45 +09:00
Hiroyasu Nishiyama
5c5bebd689 fix handling of multi-line node label 2020-06-13 23:28:10 +09:00
Hiroyasu Nishiyama
5e8e739f78 fix position of empty group with multi-line label 2020-06-12 16:07:46 +09:00
Nick O'Leary
7be824640c
Fix snapToGrid 2020-06-10 01:02:48 +01:00
Nick O'Leary
c061487a16
Massively reduce our dependency on d3 to render the view
This is a slightly scary set of changes to be making. It overhauls
how the view is rendered.

Rather than use d3 for every single part of generating the view,
we new use native DOM functions as much as possible.

d3 is still used for the basic heavy lifting of working out what
nodes/links etc need to be added/removed from the view. But once
it comes to rendering them, d3 is side-lined as much as possible.

There's room for further improvement. This change focusses on Nodes
and Links. It has not touched groups, subflow-ports and link-nodes.
2020-06-10 00:45:20 +01:00
Nick O'Leary
091a462a42
Add 'add' option to touch radialMenu for quick-add dialog 2020-06-05 15:48:45 +01:00
Nick O'Leary
efecfa328b
Fix up event handling when deleting groups and tabs 2020-06-03 14:23:26 +01:00
Hiroyasu Nishiyama
3345f2f3b8 simplify code structure 2020-05-28 10:23:50 +09:00
Hiroyasu Nishiyama
05f816fc5d not emit change event on group delete 2020-05-25 08:46:35 +09:00
Nick O'Leary
15cc88de6c
[info-sidebar] Handle node/group/flows with \\n in their name 2020-05-19 17:53:20 +01:00
Hiroyasu Nishiyama
5f5e6ea845 fix error on empty label 2020-05-17 11:44:23 +09:00
Hiroyasu Nishiyama
243915516e fix line break of group label 2020-05-16 20:56:21 +09:00
Nick O'Leary
fbd911ed27
[outliner] Keep outliner selection in sync with workspace 2020-05-14 22:08:25 +01:00
Nick O'Leary
ff310f89bd
[groups] Support RED.view.reveal(group-id) 2020-05-12 10:59:41 +01:00
Nick O'Leary
1a9c4b7714
All node button to be clicked via api call 2020-04-27 11:03:43 +01: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
b032e00d01
[groups] increase group border radius 2020-04-14 22:39:42 +01:00
Nick O'Leary
fbfc74e5ca
[groups] Ensure newly imported nodes have width/height 2020-04-02 11:58:08 +01:00
Nick O'Leary
5da89892b4
[groups] Draw group selection above all other groups 2020-04-01 14:10:35 +01:00
Nick O'Leary
7fa4df082e
Force sync redraw of view when replacing unknown nodes 2020-03-31 15:58:51 +01:00
Hiroyasu Nishiyama
fa8236ee2c update for recent change of dev branch 2020-03-31 20:32:07 +09:00
Hiroyasu Nishiyama
08ec04c889 merge upstream/dev 2020-03-31 19:05:22 +09:00
Hiroyasu Nishiyama
e5150ea012 force redraw after node installation 2020-03-31 16:48:20 +09:00
Nick O'Leary
294696daf5
Merge branch 'dev' into groups 2020-03-30 23:42:52 +01:00
Nick O'Leary
05fc3c5eca
Merge branch 'master' into dev 2020-03-30 23:41:33 +01:00
Nick O'Leary
6ae7c51dc5
Check node props when deciding if pasted node can splice links
Fixes #2494
2020-03-29 20:33:15 +01:00
Nick O'Leary
b1d0013214
[groups] Better ordering of group elements on the DOM 2020-03-26 22:51:06 +00:00
Nick O'Leary
e0bef941b4
[groups] Include groups when copying whole tabs 2020-03-26 20:26:58 +00:00
Nick O'Leary
1bdbd31b96
[groups] Overhaul group drag handling for empty groups 2020-03-26 15:27:34 +00:00
Nick O'Leary
3e7f58dedd
[groups] Include group counts in copy/paste notifications 2020-03-26 15:22:59 +00:00
Nick O'Leary
7c91c4ae5a
[groups] Prevent subflow port nodes being added group 2020-03-24 14:05:35 +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
64af1f7e9b
[groups] Lasso should select top-most group of selection 2020-03-23 22:04:40 +00:00
Nick O'Leary
f0038e9796
[groups] Use requestAnimationFrame for view redraw
This moves the expensive redraw code out of the event handling phase
and onto the browser's repaint phase. This makes the event handling
more responsive, particularly when dragging a large number of nodes.

It also removes lots of unnecessary anonymous functions in the redraw
code that should also improve performance.
2020-03-23 21:30:52 +00:00
Nick O'Leary
768aa4ac92
[groups] getGroupAt should return top most group 2020-03-23 21:30:09 +00:00
Nick O'Leary
f61c137ea3
[groups] Improve styling of group selection/highlight 2020-03-23 14:51:18 +00:00
Nick O'Leary
20a8059758
[groups] Add style options for group label 2020-03-20 20:00:03 +00:00
Nick O'Leary
58696c6ad4
[groups] Add better colour picker for group fill/stroke 2020-03-19 13:41:54 +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
a8bc753720
[groups] Show group info when selected in sidebar 2020-03-16 11:16:18 +00:00
Nick O'Leary
266df86d98
[groups] Add menu options for group actions 2020-03-16 10:20:48 +00:00
Nick O'Leary
27c462fee9
[groups] Support dragging node from palette into group 2020-03-13 23:01:19 +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
fc3d0ab053
[groups] Keep groups ordered by depth in DOM 2020-03-09 15:10:54 +00:00
Nick O'Leary
d1dd7d1d51
[groups] Support copy/paste/import/export of groups 2020-03-09 11:14:18 +00:00
Nick O'Leary
9a0c843f29
[groups] Support deleting groups as part of selection 2020-03-05 22:49:31 +00:00
Nick O'Leary
4d96d95370
[groups] Add merge-selection-to-group and remove-selection-from-group 2020-03-05 15:52:26 +00:00
Nick O'Leary
51ea5dc342
[groups] Add ungroup-selection action 2020-03-05 10:43:28 +00:00
Nick O'Leary
97d58e34f2
[groups] Support nested groups in editor 2020-03-04 21:48:38 +00:00
Nick O'Leary
86ce5c591b
[groups] add basic group functionality to editor 2020-03-03 20:55:01 +00:00
Nick O'Leary
a09b3bb6c7
Merge branch 'dev' into pr_2242 2020-02-25 14:32:33 +00:00
Nick O'Leary
6b52206186
Merge branch 'master' into dev 2020-01-22 11:54:24 +00:00
Nick O'Leary
9d4238e5cc
Re-enable jshint on editor and fixup issues 2020-01-22 11:53:41 +00:00