cytoscape.js: selected nodes are fixed in arbor layout - cytoscape.js

I render a small graph using cytoscape.js 2.2.4 and the arbor layout.
When I do the layout a second time with one or more nodes selected, the selected ones are fixed and do not move.
You can see what I mean in the Arbor section of the cytoscape.js docs:
click 'Run code' to apply the arbor layout to the example graph once
select a node and click 'Run code' again, the selected node is fixed and does not move
I checked with cy.nodes(":locked") for locked nodes but the selection is not locked. Arbor.js has a 'fixed' property for nodes, but I can't see where cytoscape.js sets this property.
Is it possible to have the seleted node move when applying the arbor layout? Can I pass the fixed: false node property to arbor.js?
I use this to add something to the graph when clicking a node. I add some more nodes/edges and start the layout again. If the clicked node is fixed, the layout is messed up.
Update 1
I figured out that it isn't effected by the locked state of the node but rather grabbable. When I run cy.nodes().ungrabify() just before the layout, the clicked node is not fixed.
When I do cy.nodes().grabify() in the stop callback of the layout or with a long setTimeout() after the layout, the nodes become grabbable again.
But when I then click another node and start the layout again, the node stays grabbed (as in console.log(cy.nodes(":grabbed"))) even though cy.nodes().ungrabify() is called.
This looks like the grabbable/ungrabbable properties are overridden somewhere. Cytoscape.js itself uses ungrabify() and grabify() within the arbor layout function, but this doesn't have an effect.
How can I ungrabify() and grabify() the nodes?

You've encountered a renderer bug: https://github.com/cytoscape/cytoscape.js/issues/528
Should just make it into 2.2.5.

Related

RedisInsight: Configuring graph visual display/results?

Is there a way to configure the display of RedisGraph results in RedisInsight.
May be an option to edit the CSS directly is good too.
The reasons :
The color of the nodes is awful
The font-size is too small
nice to be able to change color of nodes with property value X
it will be good to be able to specify the default-property that will be displayed instead of node ID. Also on mouse-over too. (i know i can changed but it becomes tedious to do it for every result).
same for relationships
ERR: If some of the nodes in the result does not have the property you want to switch to (for display), then the 'switch' does not work i.e. all nodes still display IDs
for my screen it just happen that the +/- zoom is hidden i.e. I have to scroll back and forth. It will be good if we can use the keyboard to zoomin/zoomout
once you select something you have to click outside of the graph area to be able to scroll, supper annoying
command history on the query editor would be nice
ability to pin the result-area so that the new result does not spawn yet another area .. it is nice to have the option for multiple result-areas, but the normal interaction is refining queries rather than writing new query every time. (tabs would have been better)
if possible select-area to zoom will be nice. (by holding mouse down and selecting area )
!! double-click outside a node, may Zoom, instead of doing nothing
!! local zoom/search : typing in search-bar (there is space for it after +/-) to zoomin on the node with that have property and/or value f.e. val:3 , word:test , ...
Posting this here because couldn't find a place to give feedback on RedisInsight !

Testack white unable to find window's children

I have a WPF app that I try to automate using testack white and I'm pretty much stuck at the point where I cannot get any children for a Window (which is embedded in a Panel which is the main Window)
The problem I believe is not necessarily with white but how this app is built because (I'm using VisualUIAVerifyNative as inspector. I tried others as well but haven't seen any children in ControlView, ContentView or RawView):
- opening the inspector and expand the tree till that window it shows that this doesn't have any children
window_element_no_children
- however, if I use Focus Tracking/Hover on mouse feature (e.g. while pressing CTRL the inspector then gives you whatever element the mouse is hovering) then the whole subtree for this window then shows up. Unfortunately, even though I try to find the children at this point through my automation test it still returns me none.
window_element_with_children
Does anyone have any idea how exactly I can "force" a check on this window so that the children will then be displayed? Same as how FocusTracking in inspector works like.
Thanks a lot
Have you tried using AutomationElementFinder?
var children = new AutomationElementFinder(window.AutomationElement).Children(
AutomationSearchCondition.All);
You can try other SearchCondition too.

How to make text within nodes findable in cytoscape.js, dagre-layout

I have been trying to use the dagre-layout in cytoscape.js to create a graph, however I seem unable to find the text within nodes, which I am able to do in dagre-d3, (EDIT: Find as in CTRL + F).
It seems like even in demos such as: http://js.cytoscape.org/demos/labels/ this is not available.
Any ideas on how to make it possible?
When working with Cytoscape, you're not working with traditional DOM elements for the nodes and edges. Rather it draws on a canvas. So are you screwed?
Nope. You just need to program a bit. Add a text box to your page. Add an on change listener to it (or add a button to search only when the user clicks it). When the user types, you can run a search that reads through all of the nodes in the graph. For speed you might want to implement a binary search based on the node's text.
When you find text that matches (exact or partial), you can add a class to change the visual appearance using Cytoscape.js' addClass method. You decision of how to show the data is up to you.

labview find terminal grayed out

I am working on some inherited code and I ran across something I've not seen in LabVIEW before...see attached screenshot. Notice when I right-click on the property node and try to find the Terminal...Terminal is grayed out. When I find the Control, it takes me to a blank spot on the front panel that has absolutely no controls (I've ensured that the Control has Visible=True by programmatically setting and verifying that property). I've never seen a Control without a Terminal...what's up? Using LabVIEW 2012.
After quite a bit of digging, I found the answer:
It turns out that the Property Node is pointing (linked) to a control which is buried inside a cluster.
The lesson here is: if Find >> Terminal is grayed out, it's possible (likely) that the control to which the Property Node is linked is inside a cluster. I re-created the scenario with this mini-example:
Finally, I couldn't find the front panel control at the onset because it had its Visible attribute set to false inside the cluster (the cluster was visible, but not the element within the cluster) and it was physically placed far away from the other controls within the cluster, AND it was placed on a hidden Tab page.

JavaFX 2 block mouse property

JavaFX 1.x had a blockinMouse property you could set to stop events propagating down to nodes below (for instance a right click to bring up a context menu when you'd just want it on the top node.)
I'm struggling to find an equivalent in JavaFX 2 though, I'm assuming it must be somewhere but the only things I've dug up online have been similar complaints, and I'd like to avoid the brute force style answer that's listed there.
Seems I was approaching this the wrong way - the solution was to simply call consume(); on the event in the top most node to stop the event propagating down to the lower nodes. The mouseTransparent property was similar but not what I was after, it just controls whether the node receives mouse events or just passes them on (similar to the old glasspane like approaches.)
In JavaFX 2 this is called: pointerTransparent.