rafaelthca / aimarajs Goto Github PK
View Code? Open in Web Editor NEWPure Javascript TreeView Component
Pure Javascript TreeView Component
When the container div is within a div that has a given size and the container div itself is set to "overflow-y: auto;" the expand and collapse signs are not scrolling.
But if I set the position property of exp_col and exp_col_empty to relative in Aimara.css then everything works within my structure and in your example also.
I am not sure if this is a bug in my code or in Aimara.css.
Modified Aimara.css:
img.exp_col {
position: relative;
margin-top: 4px;
margin-left: -20px;
vertical-align: sub;
}
img.exp_col_empty {
position: relative;
margin-top: 4px;
margin-left: -20px;
vertical-align: sub;
width: 16px;
}
My Layout and CSS:
<div id="content">
<div id="tabAssets" >
<div id="treeAssets"></div>
<div id="assetDetails"></div>
</div>
</div>
#content {
display: block;
/* make the content to fill entire page (parent is body) - header and footer */
position: absolute;
top: 50px;
bottom: 30px;
left: 0px;
right: 0px;
padding: 5px;
}
#tabAssets {
display: grid;
grid-template-columns: 2fr 6fr;
grid-template-areas:
"treeAssets assetDetails"
;
grid-gap: 5px;
/* make the content to fill entire parent */
position: absolute;
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
padding: 5px;
}
#treeAssets {
grid-area: treeAssets;
display: inline-block;
max-height: inherit;
overflow-y: auto;
}
How to save and load tree structure? i mean using JSON?
I modified both the javascript and .css files to do this.
Here are the 2 added lines of javascript to "adjustLines", with existing surrounding code shown for context:
if (item != null)
if (item.tagName.toLowerCase() == "li") {
item.className = "";
item.style.backgroundColor = 'transparent';
}
}
New>> var root = lists[0]; // set Root node's className to "first" to eliminate line at top of node
New>> root.lastChild.className = "first";
}
}
window.onclick = function() {
if (tree.contextMenuDiv!=null)
tree.contextMenuDiv.style.display = 'none';
Here's the new .css, shown after the existing ul.tree li.last style;
ul.tree li.last {
background: #fff url(lastnode.png) no-repeat;
}
New>> ul.tree li.first {
New>> background: #fff url(node.png) no-repeat;
New>> }
I would like very much to use your library in my bachelor thesis. Could you please add a license to it?
I can get the name of the node using:
node.text;
I also want to get the name of the parent of that node. How to do that ?
i want set a link how to do?
Gostaria de usar sua biblioteca. Qual a licenca do codigo?
Hello,
Can I integrate python and aimarajs .I have tree datastructure written in python but I want vizualize .So please help.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.