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
Nick O'Leary
a54ca699b5
Scroll the view with WASD/Cursor keys when nothing selected
2019-11-13 10:06:25 +00:00
Kazuhito Yokoi
ddd0d1bef3
Fix invisible icons in IE
2019-10-02 17:39:38 +09:00
Nick O'Leary
9775d3a33d
Ensure status is refreshed when switching tabs
2019-09-30 09:56:51 +01:00
Yuma Matsuura
7957ec4369
Modify id
2019-09-27 19:17:17 +09:00
Nick O'Leary
3129d44ff1
Realign subflow output port labels
2019-09-10 14:31:17 +01:00
Nick O'Leary
db9fb8480a
Filter quickadd properly when splicing a wire
2019-09-10 11:38:35 +01:00
Nick O'Leary
c138e2ffb4
Mark workspace dirty when deleting link node link
...
Fixes #2274
2019-09-10 11:12:38 +01:00
Yuma Matsuura
17653761b9
Update a line break function
2019-09-03 18:43:46 +09:00
Nick O'Leary
311c7b1158
Merge pull request #2261 from eeyepee/master
...
Add HTTP Persistent (session reuse) capability
2019-08-21 11:44:35 +01:00
Nick O'Leary
e72faef839
Check both node props and defn props when deciding to splice
2019-08-16 14:59:15 +01:00
Nick O'Leary
b274bafe8e
Allow a node to change if it has an input port
...
Closes #2268
2019-08-15 13:29:08 +01:00
Nick O'Leary
426fd499ce
Fix ctrl-click on wire whilst already in quick-join
2019-08-14 09:50:34 +01:00
Nick O'Leary
58784b7568
Use ctrl-click on wire to splice node in place
2019-08-13 10:31:21 +01:00
Nick O'Leary
7d4c2442da
Merge branch 'dev' into pr_2221
2019-08-12 14:44:30 +01:00
Nick O'Leary
6a4760e291
Mark workspace dirty when shift-click-drag detaches wires
...
Fixes #2260
2019-08-09 10:24:52 +01:00
Nick O'Leary
7926055b97
Merge branch 'master' into dev
2019-08-06 16:10:33 +01:00
Nick O'Leary
542cf3147d
Support displaying falsey node status values
...
Fixes #2246
2019-08-06 15:12:13 +01:00
Yuma Matsuura
a42d7d867e
Add a libe break function
2019-07-26 11:36:22 +09:00
Kunihiko Toumura
7adf102d8d
Initial implementation of redo (un-undo)
2019-06-22 16:05:50 +09:00
Nick O'Leary
c1104d1cd6
Revealing node position needs to account for zoom level
...
Fixes #2172
2019-06-21 12:53:09 +01:00
Nick O'Leary
87a815fd6f
Don't allow a link node virtual wire to connect to normal port
2019-06-21 12:45:50 +01:00
Nick O'Leary
d623848c87
Update all node icons to SVG
...
When listing icons provided by a module, if there is a png and svg
with the same name, only the svg will be listed.
If a node asks for a png icon which is not known, but there is a
corresponding svg, that will be used instead.
2019-06-21 12:36:20 +01:00
Nick O'Leary
f955d63707
Merge branch 'disable-node' into dev
2019-06-18 11:33:20 +01:00
Nick O'Leary
2473249c8b
Allow config nodes to be disabled, tidy css and add actions
2019-06-17 22:46:34 +01:00
Nick O'Leary
d13dc4fba3
Don't allow a link node virtual wire to connect to normal port
2019-06-17 15:37:45 +01:00
Nick O'Leary
41a0af032c
Enable individual flow nodes to be disabled
2019-06-14 22:12:47 +01:00
Nick O'Leary
460e3ad395
Fix select-all action in main view
2019-06-07 14:35:22 +01:00
Nick O'Leary
7d27df1b97
Add shift-cursor handling for moving quick-add dialog
2019-06-06 17:17:44 +01:00
Nick O'Leary
423aba5bab
Ensure ndoe status icon is shown when value set
2019-05-27 21:07:27 +01:00
Nick O'Leary
c514d988df
Revealing node position needs to account for zoom level
...
Fixes #2172
2019-05-25 22:11:05 +01:00
Nick O'Leary
b105a12505
Fix palette node id handling so search works
...
Fixes #2173
2019-05-24 22:13:21 +01:00
Nick O'Leary
32714c5dac
Fix node multi-select mode
2019-05-24 10:26:00 +01:00
Nick O'Leary
a71d4223ff
Add node-select to typedInput
2019-05-23 23:38:42 +01:00
Nick O'Leary
20cba6411b
Disable copy/paste and enable select-all in node-select mode
2019-05-23 16:48:07 +01:00
Nick O'Leary
cae003d4fa
Add RED.view.selectNodes api for node selection whilst editing
2019-05-23 16:39:06 +01:00
Nick O'Leary
8bdba9178a
Line-up view tooltip text (again) having fixed size calculation
2019-05-22 00:10:55 +01:00
Nick O'Leary
97f11e38cd
Minimise work done to calculate node label widths
...
Currently, everytime the tab is switched, we recalculate the
width of every node. There's no need to do that as the width
will not have changed - unless it has changed, but then the
dirty/changed flag will be set on that one node and it will
get handled.
Also avoid endless added/removing an element to calculate the
dimenstions - keep it on the dom (keyed by className) and
positioned well away from the visible space.
2019-05-22 00:04:19 +01:00
Nick O'Leary
9ed3a6748a
Fix node label size calculation
2019-05-21 23:48:33 +01:00
Nick O'Leary
8567f1655e
Only redraw node status when it has changed
2019-05-16 14:42:41 +01:00
Nick O'Leary
68b94737ed
Add tooltip on node error icon for validation errs
2019-05-16 14:42:21 +01:00
Nick O'Leary
bbe41febf1
Fix view tooltip text position
2019-05-15 14:17:44 +01:00
Nick O'Leary
031362a633
Move all colours to sass variables
2019-05-15 13:54:29 +01:00
Nick O'Leary
db5e79a19b
Convert node-change/error icons to SVG
2019-05-08 19:05:30 +01:00
Nick O'Leary
50228c5970
Namespace more editor component CSS
2019-05-08 13:26:48 +01:00
Nick O'Leary
8dc1ad8168
Namespace workspace/view css
2019-05-01 22:41:20 +01:00
Nick O'Leary
a2632fdcc8
Namespace all palette css
2019-04-29 22:38:14 +01:00
Nick O'Leary
10c818474c
Tidy zoom control statusBar widget
2019-04-29 20:53:04 +01:00
Nick O'Leary
5e8279cf51
Add workspace statusBar
2019-04-29 17:24:14 +01:00
Nick O'Leary
b5da6f9c74
Upgrade to jq 3.3.1 / jq-ui 1.12.1
...
Uses jquery-migrate-3.0.1.min.js to keep things working.
2019-04-29 11:50:15 +01:00
Nick O'Leary
dd89ea3731
Prevent wire from normal node to link virtual port
...
Fixes #2114
2019-03-28 10:48:48 +00:00
Kazuhito Yokoi
66fc4b536c
Automatic placing of node icon
2019-03-05 21:21:23 +09:00
Dave Conway-Jones
2937b25d6d
Shift status text left if no shape specified
2019-02-13 14:36:36 +00:00
Nick O'Leary
06cc08d9f7
Better align node status text to status dot
2019-02-09 21:27:54 +00: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
aa9a37da38
Add placeholder node when in quick-add mode
2019-01-23 16:27:13 +00:00
Dave Conway-Jones
e2ee88de84
offset menu so you can see node placement
2019-01-21 22:08:25 +00:00
Dave Conway-Jones
1d1ab5b7b2
don't pin new nodes to grid if not using grid
2019-01-21 16:15:38 +00:00
Dave Conway-Jones
766ccf85c2
add fast entry via keyboard for string of nodes
2019-01-20 14:43:17 +00:00
Nick O'Leary
4749c92252
Add View Tools
2019-01-18 21:19:03 +00:00
Nick O'Leary
0ec04a3624
Allow notifications to be reused in place rather than stack
...
For example, clipboard actions now reuse the same notification.
Similarly the Inject node will reuse its notification when
injecting.
2019-01-09 14:02:46 +00:00
Nick O'Leary
8502cf8498
Highlight port on node hover while joining
2018-12-18 21:45:33 +00:00
Nick O'Leary
33dade0584
Support drag-wiring of link nodes
2018-12-18 10:57:53 +00:00
Nick O'Leary
1c66c88f95
Allow copy-to-clipboard copy whole tabs
2018-11-09 09:51:55 +01:00
Nick O'Leary
dc880c672a
Make disabled flows more obvious in editor
2018-11-08 18:04:36 +01:00
Nick O'Leary
c0d8f904b3
Support ctrl-click selection of flow tabs
2018-10-30 22:18:16 +00:00
Nick O'Leary
7b28ba6078
Allow left-hand node button to act as toggle
2018-10-29 20:55:35 +00:00
Nick O'Leary
d4589ed7e3
Hide tooltips when a node is deleted
2018-10-26 23:17:09 +01:00