Skip to content

Commit b369ee9

Browse files
committed
Add test images.
1 parent 8abdadf commit b369ee9

File tree

8 files changed

+253
-182
lines changed

8 files changed

+253
-182
lines changed

tools/compare/compare.js

Lines changed: 235 additions & 167 deletions
Large diffs are not rendered by default.

tools/compare/index.html

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@
9797

9898
#images img {
9999
background-color: white;
100-
margin: 4px;
101-
padding: 4px;
100+
margin: 5px;
101+
padding: 6px;
102102
border: 1px solid #777;
103103
}
104104

@@ -194,9 +194,8 @@
194194
<script type="module">
195195
// Image Diff: https://github.com/mapbox/pixelmatch
196196
import pixelmatch from 'https://cdn.skypack.dev/[email protected]';
197-
198197
document.addEventListener('DOMContentLoaded', () => {
199-
addListeners();
198+
app(pixelmatch);
200199
});
201200
</script>
202201
</head>
@@ -218,14 +217,14 @@
218217
&nbsp;&nbsp;&nbsp;&nbsp;<code>grunt generate:current</code><br />
219218
&nbsp;&nbsp;&nbsp;&nbsp;<code>grunt generate:reference</code><br /><br />
220219
Shortcuts:<br />
221-
&nbsp;&nbsp;&nbsp;&nbsp;<code>Alt + I</code> - select the <code>images/</code> folder. This folder needs to
222-
contain <code>current/</code> and <code>reference/</code> subfolders.<br />
223-
&nbsp;&nbsp;&nbsp;&nbsp;<code>Alt + C</code> - select the <code>current/</code> folder. This can be any folder,
224-
and does not need to be named "current". This allows you to choose arbitrary folders to compare (e.g., from two
225-
different repos).<br />
226-
&nbsp;&nbsp;&nbsp;&nbsp;<code>Alt + R</code> - select the <code>reference/</code> folder. This can be any folder,
227-
and does not need to be named "reference". This allows you to choose arbitrary folders to compare (e.g., from two
228-
different repos).<br /><br />
220+
&nbsp;&nbsp;&nbsp;&nbsp;<code>CTRL + SHIFT + I</code> - select the <code>images/</code> folder. This folder needs
221+
to contain <code>current/</code> and <code>reference/</code> subfolders.<br />
222+
&nbsp;&nbsp;&nbsp;&nbsp;<code>CTRL + SHIFT + C</code> - select the <code>current/</code> folder. This can be any
223+
folder, and does not need to be named "current". This allows you to choose arbitrary folders to compare (e.g.,
224+
from two different repos).<br />
225+
&nbsp;&nbsp;&nbsp;&nbsp;<code>CTRL + SHIFT + R</code> - select the <code>reference/</code> folder. This can be any
226+
folder, and does not need to be named "reference". This allows you to choose arbitrary folders to compare (e.g.,
227+
from two different repos).<br /><br />
229228

230229
&nbsp;&nbsp;&nbsp;&nbsp;<code>1</code> - Show images side-by-side<br />
231230
&nbsp;&nbsp;&nbsp;&nbsp;<code>2</code> - Flip between current / reference image. Use LEFT | RIGHT arrow keys.<br />
@@ -240,7 +239,7 @@
240239
<!-- INFORMATION -->
241240
<p>
242241
Click to open:
243-
<a href="#" onclick="openImagesFolder()"><code>vexflow/build/images/</code></a
242+
<a id="chooseImagesFolder" href="#"><code>vexflow/build/images/</code></a
244243
><br />If a "Let site view files?" pop-up appears, choose <b>View Files</b>.
245244
</p>
246245
<p>
@@ -263,8 +262,12 @@
263262
</div>
264263
<!-- LIST OF IMAGES -->
265264
<div class="centered">
266-
<div id="labelCurrent" class="label"><a href="#" onclick="openCurrentFolder()">CURRENT</a></div>
267-
<div id="labelReference" class="label"><a href="#" onclick="openCurrentFolder()">REFERENCE</a></div>
265+
<div id="labelCurrent" class="label">
266+
<a id="chooseCurrentFolder" href="#">CURRENT</a>
267+
</div>
268+
<div id="labelReference" class="label">
269+
<a id="chooseReferenceFolder" href="#">REFERENCE</a>
270+
</div>
268271
</div>
269272
<div class="centered">
270273
<select id="selectBoxCurrent" size="5" onchange="if (this.selectedIndex > -1) selectedCurrentImage();"></select>
12.6 KB
Loading
13.9 KB
Loading
18.8 KB
Loading
34.1 KB
Loading
12.7 KB
Loading
15 KB
Loading

0 commit comments

Comments
 (0)