# jstree
[jsTree](http://www.jstree.com/) is jquery plugin, that provides interactive trees. It is absolutely free, [open source](https://github.com/vakata/jstree) and distributed under the MIT license.
jsTree is easily extendable, themable and configurable, it supports HTML & JSON data sources, AJAX & async callback loading.
jsTree functions properly in either box-model (content-box or border-box), can be loaded as an AMD module, and has a built in mobile theme for responsive design, that can easily be customized. It uses jQuery's event system, so binding callbacks on various events in the tree is familiar and easy.
You also get:
* drag & drop support
* keyboard navigation
* inline edit, create and delete
* tri-state checkboxes
* fuzzy searching
* customizable node types
_Aside from this readme you can find a lot more info on [jstree.com](http://www.jstree.com) & [the discussion group](https://groups.google.com/forum/#!forum/jstree)_.
---
<!-- MarkdownTOC depth=0 autolink=true bracket=round -->
- [Getting Started](#getting-started)
- [Include all neccessary files](#include-all-neccessary-files)
- [Populating a tree using HTML](#populating-a-tree-using-html)
- [Populating a tree using an array \(or JSON\)](#populating-a-tree-using-an-array-or-json)
- [The required JSON format](#the-required-json-format)
- [Populating the tree using AJAX](#populating-the-tree-using-ajax)
- [Populating the tree using AJAX and lazy loading nodes](#populating-the-tree-using-ajax-and-lazy-loading-nodes)
- [Populating the tree using a callback function](#populating-the-tree-using-a-callback-function)
- [Working with events](#working-with-events)
- [Interacting with the tree using the API](#interacting-with-the-tree-using-the-api)
- [More on configuration](#more-on-configuration)
- [Plugins](#plugins)
- [checkbox](#checkbox)
- [contextmenu](#contextmenu)
- [dnd](#dnd)
- [massload](#massload)
- [search](#search)
- [sort](#sort)
- [state](#state)
- [types](#types)
- [unique](#unique)
- [wholerow](#wholerow)
- [More plugins](#more-plugins)
- [PHP demos moved to new repository](#php-demos-moved-to-new-repository)
- [License & Contributing](#license--contributing)
<!-- /MarkdownTOC -->
---
## Getting Started
### Include all neccessary files
To get started you need 3 things in your page:
1. jQuery (anything above 1.9.1 will work)
2. A jstree theme (there is only one theme supplied by default)
3. The jstree source file
```html
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/jstree/3.3.3/themes/default/style.min.css" />
<script src="//cdnjs.cloudflare.com/ajax/libs/jstree/3.3.3/jstree.min.js"></script>
```
_If you decide to host jstree yourself - the files are located in the `dist` folder. You can safely ignore the `dist/libs` folder._
---
### Populating a tree using HTML
Now we are all set to create a tree, inline HTML is the easiest option (suitable for menus). All you need to do is select a node (using a jQuery selector) and invoke the `.jstree()` function to let jstree know you want to render a tree inside the selected node. `$.jstree.create(element)` can be used too.
```html
<div id="container">
<ul>
<li>Root node
<ul>
<li>Child node 1</li>
<li>Child node 2</li>
</ul>
</li>
</ul>
</div>
<script>
$(function() {
$('#container').jstree();
});
</script>
```
[view result](http://jsfiddle.net/vakata/2kwkh2uL/)
_You can add a few options when rendering a node using a data-attribute (note the quotes):_
```html
<li data-jstree='{ "selected" : true, "opened" : true }'>Root node ...
```
---
### Populating a tree using an array (or JSON)
Building trees from HTML is easy, but it is not very flexible, inline JS data is a better option:
```html
<div id="container"></div>
<script>
$(function() {
$('#container').jstree({
'core' : {
'data' : [
{ "text" : "Root node", "children" : [
{ "text" : "Child node 1" },
{ "text" : "Child node 2" }
]
}
]
}
});
});
</script>
```
[view result](http://jsfiddle.net/vakata/2kwkh2uL/4478/)
Unlike the previous simple HTML example, this time the `.jstree()` function accepts a config object.
For now it is important to note that jstree will try to parse any data you specify in the `core.data` key and use it to create a tree. As seen in the previous example, if this key is missing jstree will try to parse the inline HTML of the container.
#### The required JSON format
The data you use must be in a specific format, each branch of the tree is represented by an object, which must at least have a `text` key. The `children` key can be used to add children to the branch, it should be an array of objects.
_Keep in mind, you can use a simple string instead of an object if all you need is node with the given text, the above data can be written as:_
```js
[ { "text" : "Root node", "children" : [ "Child node 1", "Child node 2" ] } ]
```
There are other available options for each node, only set them if you need them like:
* `id` - makes if possible to identify a node later (will also be used as a DOM ID of the `LI` node). _Make sure you do not repeat the same ID in a tree instance (that would defeat its purpose of being a unique identifier and may cause problems for jstree)_.
* `icon` - a string which will be used for the node's icon - this can either be a path to a file, or a className (or list of classNames), which you can style in your CSS (font icons also work).
* `data` - this can be anything you want - it is metadata you want attached to the node - you will be able to access and modify it any time later - it has no effect on the visuals of the node.
* `state` - an object specifyng a few options about the node:
- `selected` - if the node should be initially selected
- `opened` - if the node should be initially opened
- `disabled` - if the node should be disabled
- `checked` - __checkbox plugin specific__ - if the node should be checked (only used when `tie_selection` is `false`, which you should only do if you really know what you are doing)
- `undetermined` - __checkbox plugin specific__ - if the node should be rendered in undetermined state (only used with lazy loading and when the node is not yet loaded, otherwise this state is automatically calculated).
* `type` - __types plugin specific__ - the type of the nodes (should be defined in the types config), if not set `"default"` is assumed.
* `li_attr` - object of values which will be used to add HTML attributes on the resulting `LI` DOM node.
* `a_attr` - object of values which will be used to add HTML attributes on the resulting `A` node.
Here is a new demo with some of those properties set:
```html
<div id="container"></div>
<script>
$(function() {
$('#container').jstree({
'core' : {
'data' : [
{
"text" : "Root node",
"state" : {"opened" : true },
"children" : [
{
"text" : "Child node 1",
"state" : { "selected" : true },
"icon" : "glyphicon glyphicon-flash"
},
{ "text" : "Child node 2", "state" : { "disabled" : true } }
]
}
]
}
});
});
</script>
```
[view result](http://jsfiddle.net/vakata/2kwkh2uL/4479/)
---
### Populating the tree using AJAX
Building off of the previous example, let's see how to have jstree make AJAX requests for you.
```html
<div id="container"></div>
<script>
$(function() {
$('#container').jstree({
'core' : {
'data' : {
"url" : "//www.jstree.com/fiddle/",
"dataType" : "json" // needed only if you do not supply JSON headers
}
}
});
});
</script>
```
The server response is:
```json
[{
"id":1,"text":"Root node","children":[
{"
没有合适的资源?快使用搜索试试~ 我知道了~
LAStools.zip
共1107个文件
png:167个
exe:105个
txt:84个
需积分: 9 4 下载量 98 浏览量
2021-08-03
12:59:56
上传
评论
收藏 58.22MB ZIP 举报
温馨提示
涉及点云las、laz、pyz、txt等读取写入,lasinfo点云信息概览,laszip点云无损压缩,以及点云voxel抽稀等源码及exe。
资源推荐
资源详情
资源评论
收起资源包目录
LAStools.zip (1107个子文件)
algorithm 1KB
pre_process_mobile_lidar_into_classified_adaptive_tiling.bat 7KB
tutorial3_raster_products_tile_based_pipeline.bat 7KB
photogrammetry_point_processing_example01.bat 6KB
tutorial1_quality_check.bat 4KB
different_ways_to_create_a_chm.bat 4KB
pit_free_script.bat 4KB
tutorial2_lidar_preparation_tile_based_pipeline.bat 4KB
planar_patches_tls.bat 3KB
planar_patches_mls.bat 3KB
huge_las_file_extract_ground_points_only.bat 3KB
generating_a_pit_free_dsm_beam_width.bat 3KB
generating_a_pit_free_chm_beam_width.bat 3KB
photogrammetry_points_to_dtm_dsm_countours.bat 3KB
typical_lidar_preparation_pipeline.bat 3KB
generating_a_pit_free_chm_beam_width_piped.bat 3KB
generating_a_pit_free_chm.bat 2KB
typical_raster_products_pipeline.bat 2KB
lidar_to_dtm_dsm_iso_laz_tiles.bat 2KB
typical_quality_check_pipeline.bat 2KB
create_tiled_hillshaded_dtm.bat 2KB
huge_las_file_thin_with_percentiles.bat 2KB
create_single_hillshaded_dtm.bat 2KB
quality_check_single_block.bat 1KB
do_not_use.bat 1KB
huge_las_file_thin_with_fine_grid.bat 1KB
huge_las_file_copy_classification_attribute.bat 1KB
huge_las_file_classify_ground.bat 1008B
huge_las_file_sort_by_gpstime.bat 977B
huge_las_file_delete_duplicates.bat 959B
huge_las_file_sort_spatial_coherence.bat 939B
quality_check_across_blocks.bat 541B
classify_lidar.bat 291B
bitset 33KB
demzip_api.c 36KB
laszip_api.c 36KB
macros.cmake 9KB
win32_compiler_options.cmake 3KB
cpack.cmake 2KB
unix_compiler_options.cmake 910B
common.cmake 466B
libraries.cmake 418B
LASlib-config.cmake 320B
compiler_options.cmake 253B
directories.cmake 229B
modules.cmake 120B
policies.cmake 116B
geoprojectionconverter.cpp 354KB
lasinfo.cpp 229KB
lastransform.cpp 194KB
lasfilter.cpp 185KB
laszip_dll.cpp 162KB
demzip_dll.cpp 160KB
laszipdllexample.cpp 135KB
lasreader.cpp 117KB
lasreaditemcompressed_v4.cpp 74KB
lasreaditemcompressed_v3.cpp 74KB
lasreader_las.cpp 73KB
laswriteitemcompressed_v3.cpp 72KB
lasreader_txt.cpp 72KB
laswriteitemcompressed_v4.cpp 72KB
las2las.cpp 70KB
lasdiff.cpp 69KB
lasreader_ply.cpp 63KB
las2txt.cpp 60KB
lasutility.cpp 58KB
lasquadtree.cpp 55KB
lasreadermerged.cpp 53KB
lasreader_dtm.cpp 51KB
laswriter_las.cpp 44KB
laszip.cpp 33KB
txt2las.cpp 32KB
laswriter.cpp 30KB
lasreader_bil.cpp 27KB
lasprecision.cpp 27KB
laszip.cpp 27KB
laswritercompatible.cpp 24KB
laswriter_txt.cpp 23KB
lasreadpoint.cpp 22KB
lasreader_shp.cpp 22KB
laswriteitemcompressed_v2.cpp 20KB
lasreader_asc.cpp 20KB
laswriteitemcompressed_v1.cpp 20KB
lasinterval.cpp 19KB
lasindex.cpp 19KB
lasreaditemcompressed_v2.cpp 17KB
lasreaditemcompressed_v1.cpp 17KB
lasreaderbuffered.cpp 17KB
lasexample_write_only_full_waveform.cpp 16KB
integercompressor.cpp 14KB
lasindex.cpp 14KB
lasreader_qfit.cpp 14KB
laswritepoint.cpp 14KB
arithmeticencoder.cpp 13KB
laswaveform13reader.cpp 12KB
arithmeticdecoder.cpp 12KB
lasreader_bin.cpp 12KB
lasmerge.cpp 12KB
lasignore.cpp 11KB
fopen_compressed.cpp 9KB
共 1107 条
- 1
- 2
- 3
- 4
- 5
- 6
- 12
资源评论
程序媛一枚~
- 粉丝: 4w+
- 资源: 29
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于python实现的基于PyQt5和爬虫的小说阅读系统.zip
- 机械设计整经机上纱自动化sw20非常好的设计图纸100%好用.zip
- Screenshot_20240427_031602.jpg
- 网页PDF_2024年04月26日 23-46-14_QQ浏览器网页保存_QQ浏览器转格式(6).docx
- 直接插入排序,冒泡排序,直接选择排序.zip
- 在排序2的基础上,再次对快排进行优化,其次增加快排非递归,归并排序,归并排序非递归版.zip
- 实现了7种排序算法.三种复杂度排序.三种nlogn复杂度排序(堆排序,归并排序,快速排序)一种线性复杂度的排序.zip
- 冒泡排序 直接选择排序 直接插入排序 随机快速排序 归并排序 堆排序.zip
- 课设-内部排序算法比较 包括冒泡排序、直接插入排序、简单选择排序、快速排序、希尔排序、归并排序和堆排序.zip
- Python排序算法.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功