Skip to content

Commit eb1a799

Browse files
Example: Provide a visual indication that a hex has been loaded.
1 parent c73e50a commit eb1a799

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

docs/examples/webtool.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
outline-offset: -10px;
6666
background-color: rgba(255, 255, 255, 0.2);
6767
}
68-
#icon {
68+
#icon-v1, #icon-v2 {
6969
width: 100%;
7070
fill: #ffffff;
7171
margin-top: 26px;
@@ -111,7 +111,7 @@
111111
<h1>Universal Hex Creator</h1>
112112
<div id="drop-v1" class="drop">
113113
<h2>V1 Intel Hex</h2>
114-
<svg id="icon" xmlns="http://www.w3.org/2000/svg" width="50" height="43" viewBox="0 0 50 43">
114+
<svg id="icon-v1" xmlns="http://www.w3.org/2000/svg" width="50" height="43" viewBox="0 0 50 43">
115115
<path d="M48.4 26.5c-.9 0-1.7.7-1.7 1.7v11.6h-43.3v-11.6c0-.9-.7-1.7-1.7-1.7s-1.7.7-1.7 1.7v13.2c0 .9.7 1.7 1.7 1.7h46.7c.9 0 1.7-.7 1.7-1.7v-13.2c0-1-.7-1.7-1.7-1.7zm-24.5 6.1c.3.3.8.5 1.2.5.4 0 .9-.2 1.2-.5l10-11.6c.7-.7.7-1.7 0-2.4s-1.7-.7-2.4 0l-7.1 8.3v-25.3c0-.9-.7-1.7-1.7-1.7s-1.7.7-1.7 1.7v25.3l-7.1-8.3c-.7-.7-1.7-.7-2.4 0s-.7 1.7 0 2.4l10 11.6z" />
116116
</svg>
117117

@@ -124,7 +124,7 @@ <h2>V1 Intel Hex</h2>
124124

125125
<div id="drop-v2" class="drop">
126126
<h2>V2 Intel Hex</h2>
127-
<svg id="icon" xmlns="http://www.w3.org/2000/svg" width="50" height="43" viewBox="0 0 50 43">
127+
<svg id="icon-v2" xmlns="http://www.w3.org/2000/svg" width="50" height="43" viewBox="0 0 50 43">
128128
<path d="M48.4 26.5c-.9 0-1.7.7-1.7 1.7v11.6h-43.3v-11.6c0-.9-.7-1.7-1.7-1.7s-1.7.7-1.7 1.7v13.2c0 .9.7 1.7 1.7 1.7h46.7c.9 0 1.7-.7 1.7-1.7v-13.2c0-1-.7-1.7-1.7-1.7zm-24.5 6.1c.3.3.8.5 1.2.5.4 0 .9-.2 1.2-.5l10-11.6c.7-.7.7-1.7 0-2.4s-1.7-.7-2.4 0l-7.1 8.3v-25.3c0-.9-.7-1.7-1.7-1.7s-1.7.7-1.7 1.7v25.3l-7.1-8.3c-.7-.7-1.7-.7-2.4 0s-.7 1.7 0 2.4l10 11.6z" />
129129
</svg>
130130

@@ -158,6 +158,7 @@ <h2>V2 Intel Hex</h2>
158158
console.log(v1HexStr);
159159
document.getElementById('label-v1').textContent =
160160
'File "' + file.name + '" loaded';
161+
document.getElementById('icon-v1').style.display = 'none';
161162
};
162163
reader.readAsText(file);
163164
};
@@ -169,6 +170,7 @@ <h2>V2 Intel Hex</h2>
169170
console.log(v2HexStr);
170171
document.getElementById('label-v2').textContent =
171172
'File "' + file.name + '" loaded';
173+
document.getElementById('icon-v2').style.display = 'none';
172174
};
173175
reader.readAsText(file);
174176
};

0 commit comments

Comments
 (0)