Expand/Collapsible tables in graphviz [duplicate] - html

This question already has answers here:
Are there event listeners to detect mouse clicks on dot/SVG graph?
(3 answers)
Closed 2 years ago.
I created a graph through Graphviz.
The weights on the edges are table of links. I want this table to be expandable/collapsible by click or mouse hover.
I created this graph and tables the following way(* In this example exist a table only on one edge.):
digraph prof {
ratio = fill;
node [style=filled, fillcolor=lightblue];
bees->larvae[label=2,penwidth=0.5]
cattle->dog[label=1,penwidth=0.25]
.
.
.
jackal->dog[label=1,penwidth=0.25]
pigs->flying[label=1,penwidth=0.25,label=<<table>
<tr><td href="http://google.com">Google</td></tr>
<tr><td href="http://bing.com">bing</td></tr>
</table>>]
}
So, how can I make this table collapsible/expandable?
Thanks..

You will need to use javascript to do that. But you will probably run in to problems like wanting the layout to change depending on the node size. I would recommend using a popup when inspecting the node details though you probably still need to use javascript

Related

How to let the cross part of elements be opaque in HTML? [duplicate]

This question already has answers here:
CSS overlapping elements & opacity issue
(3 answers)
Color of stacked semi-transparent boxes depends on order?
(4 answers)
Closed last month.
This post was edited and submitted for review last month and failed to reopen the post:
Original close reason(s) were not resolved
I tried to write a HTML that enables the user to create a element with angle and color(rgba). I want the cross part to be opaque that each element has transparency
However, I can not use the simple way to do this because the cross area is still not opaque(0.5*0.5=0.75)
I want to ask for a solution to make the cross part of two element be opaque by using CSS or JavaScript.
It must be completely filled into the area. However, the element will have angle so simple JavaScript to calculate it is not working.
I wonder if someone can give me a solution.
opacity doesn't add like that..
it is like discount of 50% + 50%.. if original price is 100 . you get first discount your price is 50 but with second discount, it is 25 more so final price will be 25
for case of opacity... you have one layer which lets 50% of light through it .. and 2nd layer also 50% so basically 50% of the 50% of the lowermost layer.
easy way to think is that both of them have some transparency so together they can't be fully opaque
Imagine that are two glasses, red glass, and green glass. When you put the red glass on top of green glass, it is an overlay, not an addition. You can try it in real life

Hot to center those 3 divs into the body [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
Im wondering how to center those 3 divs into he body, i created 2 versions of the row, one with an extra outer wrap around the column and one without, Unfortuinatly since this html created with a page builder (WP visual composer) so i dont have 100% freedom to control the html structure. I tried margin: auto but couldn't make it to work.
You can find the divs im talking about on this page.
https://bonmedico.de/test/
Thanks
This question will be closed very soon because it's not according to SO rules. ( Read comments to your question to find about that ). You really should put more effort when writing questions.
But i took a look at your website. You can solve your problem in 2 ( maybe more ) ways.
add justify-content:center to the parent row of those 3 columns. Being a display: flex element it will center them horizontally.
using visual composer is easy. Just add 2 small columns ( empty ) left and right and a larger column in the middle. Something like 1/4 1/2 1/4. And in that ' bigger ' column you can add a new row continaing 3 columns ( like you have now ). Or there are more possibilities to do this. Just ' play ' around with visual composer

Using same angular directive with horizontal and vertical layout

I have 2 different form engines that share a common over-driven "Question" directive with different input types (select, calendar, multi-line, etc) based on a question type and then I want to display it in one engine like:
QuestionName InputField
and another
QuestionName
InputField
The goal is to share code with minimum duplication. Is there a good way to setup the html so it can switch back and forth or do I just move the InputField into it's own directive that can be placed twice in the question directive and show/hide as appropriate.
Thanks,
Scott
I decided on just creating an inner directive for the field portion displayed twice on the question directive using ng-if based on if it should be vertical or horizontal set at the form level.
<tr><td>questionname <span ng-if="direction==='vertical'><br /><field-directive /></span></td>

Select and Option tag i.e dropdown in html show complete list [duplicate]

This question already has answers here:
Height of an HTML select box (dropdown)
(9 answers)
Closed 7 years ago.
I have 25-30 options in my <select> </select>
tag, when i click on the select from drop down list. I get the list of first 20 options only and after that i have to scroll down the the list to select onwards i.e. for 21 to further.
But my requirement is that when click on dropdown to select, the complete list should be shown that is all 25-30 options should be shown, no scroll bar.
Pleae help me.. I had done lot of googling on it, but not got any solution.
try that snippet
$('select').on('click', function(){
$('select').attr('size', $('select option').size());
})
demo
Take a look at this question:
Height of an HTML select box (dropdown)
As accepted answer states - there is no way to do that. Suppose you will need to use custom JS drop down to achieve that.
The attribute size ot the select element, specifies the number of visible options in a drop-down list.
If the value of the size attribute is greater than 1, but lower than the total number of options in the list, the browser will add a scroll bar to indicate that there are more options to view.
If you use JQuery you can find the number of options in your select list like this:
var count = $("#mySelect :selected").length;
and set the size attribute to this number, like this:
$("select").attr('size',count);

How to create a custom GControl

I'm trying to create a gray "frame" (see pic below) around a google map, to try to convey the concept of an area of focus, as oppose to a point (which is usually represented with a marker). Note that this is not an overlay, that is, the gray "frame" should not move when you drag the map.
Edited: image link added
It appears that only option is to "subclass" GControl to create a custom control. I have 3 questions
1) First of all, is GControl subclassing the best course of action?
2) In my example, the canvas (div) where map renders can change its size (i.e is not fixed width). Do I have to delete and add custom control when canvas changes size? See docs http://code.google.com/apis/maps/documentation/controls.html#Custom_Controls on how to create a custom map control.
3) Now, how to do it. Naively, I thought I could create a table with 3 columns and 3 rows, and set display: none for the cell in the middle. But that doesn't work. I've also experimented with clipping, that didn't work either. My css skills are quite lacking, so there must be way to do this more elegantly than adding four rectangular gray divs. If I wanted to add an inner border, with divs, I would need to paint 8 then. In a nutshell, what's the best way to create a "hollow" rectangle?
Thanks
P.S. This is my first entry to StackOverflow. Just discovered it. It's impressive how well SO is put together.