Skip to content

Commit 91b3f83

Browse files
paodbjavier-godoy
authored andcommitted
chore: add hybrid demo images license information
1 parent fa0fac4 commit 91b3f83

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ This add-on is distributed under Apache License 2.0. For license terms, see LICE
118118

119119
OrgChart Add-On is written by Paola De Bartolo
120120

121+
Hybrid Demo uses [People icons created by Creartive - Flaticon](https://www.flaticon.com/free-icons/people)
122+
121123
# Developer Guide
122124

123125
## Getting started

src/test/java/com/flowingcode/vaadin/addons/orgchart/HybridEnhancedChartDemo.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
import com.flowingcode.vaadin.addons.demo.DemoSource;
2424
import com.flowingcode.vaadin.addons.orgchart.extra.TemplateLiteralRewriter;
2525
import com.vaadin.flow.component.dependency.CssImport;
26+
import com.vaadin.flow.component.html.Anchor;
27+
import com.vaadin.flow.component.html.Div;
2628
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
2729
import com.vaadin.flow.router.PageTitle;
2830
import com.vaadin.flow.router.Route;
@@ -39,7 +41,7 @@
3941
@CssImport("./styles/orgchart/hybrid-demo-styles.css")
4042
public class HybridEnhancedChartDemo extends VerticalLayout {
4143

42-
public HybridEnhancedChartDemo() {
44+
public HybridEnhancedChartDemo() {
4345
OrgChart orgchart = getExample1();
4446
String nodeTemplate = "<div class='title'>"
4547
+ "${item.data.imageUrl?`<img class='avatar'src=${item.data.imageUrl}></img>`:''}"
@@ -55,10 +57,18 @@ public HybridEnhancedChartDemo() {
5557
// make the chart to show children as vertical starting in level 3
5658
orgchart.setChartVerticalDepth(3);
5759

58-
orgchart.setChartTitle("My Organization Chart Demo - Example 4 - HYBRID CHART WITH CUSTOM TEMPLATE");
60+
// images license
61+
Div iconsDiv = new Div();
62+
Anchor iconsAnchor = new Anchor("https://www.flaticon.com/free-icons/people", "People icons created by Creartive - Flaticon");
63+
iconsAnchor.setTitle("people icons");
64+
iconsDiv.add(iconsAnchor);
65+
66+
orgchart.setChartTitle("My Organization Chart Demo - Example 4 - HYBRID CHART WITH CUSTOM TEMPLATE" + iconsDiv.getElement());
5967

6068
setSizeFull();
6169
add(orgchart);
70+
71+
6272
}
6373

6474
private OrgChart getExample1() {

0 commit comments

Comments
 (0)