-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ability to select a node clicking the icon
- Loading branch information
Florian Maffini
committed
Nov 13, 2016
1 parent
e132cb9
commit a5a77a2
Showing
5 changed files
with
102 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<!DOCTYPE html> | ||
|
||
<html> | ||
<head> | ||
<script src="../../webcomponentsjs/webcomponents-lite.js"></script> | ||
|
||
<link rel="import" href="../paper-tree.html" /> | ||
</head> | ||
<body> | ||
<template is="dom-bind"> | ||
<h3>GOT Tree: {{selected.data.name}}</h3> | ||
<paper-tree selected="{{selected}}"></paper-tree> | ||
<script> | ||
document.querySelector('paper-tree').data = { | ||
"name": "GOT", | ||
"icon": "theaters", | ||
"open": true, | ||
"children": [ | ||
{ | ||
"name": "Starks", | ||
"icon": "turned-in" | ||
}, { | ||
"name": "Lannisters", | ||
"icon": "turned-in" | ||
}, { | ||
"name": "Targaryens", | ||
"icon": "turned-in" | ||
}, { | ||
"name": "Baratheons", | ||
"icon": "turned-in", | ||
} | ||
] | ||
}; | ||
</script> | ||
</template> | ||
|
||
<template is="dom-bind"> | ||
<h3>Media Tree</h3> | ||
<paper-tree data='{ | ||
"name": "Media Center", | ||
"icon": "weekend", | ||
"open": true, | ||
"children": [{ | ||
"name": "Movies", | ||
"children": [{ | ||
"name": "Interstellar", | ||
"icon": "theaters" | ||
}, { | ||
"name": "The Godfather", | ||
"icon": "theaters" | ||
}, { | ||
"name": "Pulp Fiction", | ||
"icon": "theaters" | ||
}] | ||
}, { | ||
"name": "TV Shows", | ||
"children": [{ | ||
"name": "Breaking Bad", | ||
"icon": "theaters" | ||
}, { | ||
"name": "Game of Thrones", | ||
"icon": "theaters" | ||
}] | ||
}]}' | ||
actions='[{ | ||
"label": "Play", | ||
"event": "play" | ||
}]'> | ||
</paper-tree> | ||
</template> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters