Skip to content

Commit 503125a

Browse files
committed
Fix the icons example
1 parent 28f9b75 commit 503125a

File tree

3 files changed

+22
-30
lines changed

3 files changed

+22
-30
lines changed

Diff for: icons/index-form-library.html

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
<head>
44
<title>SurveyJS Icons</title>
55
<meta name="viewport" content="width=device-width"/>
6-
<script src="https://unpkg.com/[email protected]/umd/react.production.min.js"></script>
7-
<script src="https://unpkg.com/[email protected]/umd/react-dom.production.min.js"></script>
86
<script src="https://unpkg.com/survey-core/survey.core.min.js"></script>
9-
<script src="https://unpkg.com/survey-react-ui/survey-react-ui.min.js"></script>
7+
<script src="https://unpkg.com/survey-js-ui/survey-js-ui.min.js"></script>
108
<link href="index.css" type="text/css" rel="stylesheet"/>
119
</head>
1210
<body>

Diff for: icons/index.html

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
<head>
44
<title>SurveyJS Icons</title>
55
<meta name="viewport" content="width=device-width"/>
6-
<script src="https://unpkg.com/[email protected]/umd/react.production.min.js"></script>
7-
<script src="https://unpkg.com/[email protected]/umd/react-dom.production.min.js"></script>
86
<script src="https://unpkg.com/survey-core/survey.core.min.js"></script>
9-
<script src="https://unpkg.com/survey-react-ui/survey-react-ui.min.js"></script>
7+
<script src="https://unpkg.com/survey-js-ui/survey-js-ui.min.js"></script>
108
<script src="https://unpkg.com/survey-creator-core/survey-creator-core.min.js"></script>
119
<link href="index.css" type="text/css" rel="stylesheet"/>
1210
</head>

Diff for: icons/index.js

+20-24
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,20 @@
1-
if (typeof SurveyCreatorCore !== "undefined") {
2-
new SurveyCreatorCore.SurveyCreatorModel(); // Register Survey Creator icons
3-
}
4-
5-
function renderIcons() {
6-
let iconsDiv = document.createElement("div");
7-
iconsDiv.id = "sv-icon-holder-global-container";
8-
iconsDiv.innerHTML = "<svg>" + Survey.SvgRegistry.iconsRenderedHtml() + "</svg>";
9-
iconsDiv.style.display = "none";
10-
document.head.appendChild(iconsDiv);
11-
}
12-
renderIcons();
13-
14-
Object.keys(Survey.SvgRegistry.icons).map(name => {
15-
if (name.indexOf("pg-v1") > -1) return;
16-
const element = document.createElement("div");
17-
element.classList.add("container")
18-
element.innerHTML = `
19-
<svg>
20-
<use xlink:href="#icon-` + name + `\"></use>
21-
</svg>
22-
<span class="icon-name">icon-` + name + `</span>`;
23-
document.getElementById("icons").appendChild(element);
24-
});
1+
function renderIcons() {
2+
let iconsDiv = document.createElement("div");
3+
iconsDiv.id = "sv-icon-holder-global-container";
4+
iconsDiv.innerHTML = "<svg>" + Survey.SvgRegistry.iconsRenderedHtml() + "</svg>";
5+
iconsDiv.style.display = "none";
6+
document.head.appendChild(iconsDiv);
7+
}
8+
renderIcons();
9+
10+
Object.keys(Survey.SvgRegistry.icons).map(name => {
11+
if (name.indexOf("pg-v1") > -1) return;
12+
const element = document.createElement("div");
13+
element.classList.add("container")
14+
element.innerHTML = `
15+
<svg>
16+
<use xlink:href="#icon-` + name + `\"></use>
17+
</svg>
18+
<span class="icon-name">icon-` + name + `</span>`;
19+
document.getElementById("icons").appendChild(element);
20+
});

0 commit comments

Comments
 (0)