-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
53 lines (42 loc) · 1.37 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<html>
<head>
<title>react large tree Demo</title>
<style type="text/css">
.react-large-tree {
font-family: monospace, courier;
}
</style>
<link rel="react-large-tree.scss"></link>
</head>
<body>
"yo"
<div id="main"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.3.2/react.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.3.2/react-dom.js"></script>
<script src="react-large-tree.js"></script>
<!-- Provide your own content here if you want! -->
<script src="make-fake-content.js"></script>
<script>
/* jshint undef:false */
// or here!
// content should be an object, with a children Array
let content = generateBigTree(8, 9000)
const canDragChildInto = (childNode, parentNode) => {
return true
}
let props = {
content,
canDragChildInto,
locked: false,
editingChild: randomChildId,
labelKey: "text",
uniqueKey: "_id",
nodesToHighlight: ["bloop"],
handleContextMenu: (nodeId, position) => console.log(nodeId, position),
handleRename: (nodeId, newName) => console.log(nodeId, newName)
// childMoved: (moveDefinition) => console.log(moveDefinition)
}
ReactDOM.render(React.createElement(ReactLargeTree, props), document.getElementById('main'));
</script>
</body>
</html>