From cfbeebe7f30cb7367282b38a1ed8949febe35ebf Mon Sep 17 00:00:00 2001 From: Jonathan Hedstrom Date: Tue, 3 Dec 2019 13:25:16 -0800 Subject: [PATCH 1/2] Adds a number/counter predefined icon. - Closes #53 --- language/.en.json | 3 +++ language/af.json | 3 +++ language/ar.json | 3 +++ language/bs.json | 3 +++ language/ca.json | 3 +++ language/cs.json | 3 +++ language/da.json | 3 +++ language/de.json | 3 +++ language/el.json | 3 +++ language/es-mx.json | 3 +++ language/es.json | 3 +++ language/et.json | 3 +++ language/eu.json | 3 +++ language/fi.json | 3 +++ language/fr.json | 3 +++ language/he.json | 3 +++ language/hu.json | 3 +++ language/it.json | 3 +++ language/ja.json | 3 +++ language/ko.json | 3 +++ language/nb.json | 3 +++ language/nl.json | 3 +++ language/nn.json | 3 +++ language/pl.json | 3 +++ language/pt-br.json | 3 +++ language/pt.json | 3 +++ language/ro.json | 3 +++ language/ru.json | 3 +++ language/sl.json | 3 +++ language/sma.json | 3 +++ language/sme.json | 3 +++ language/smj.json | 3 +++ language/sr.json | 3 +++ language/sv.json | 3 +++ language/tr.json | 3 +++ language/uk.json | 3 +++ language/vi.json | 3 +++ language/zh-hans.json | 3 +++ language/zh-hant.json | 3 +++ language/zh-tw.json | 3 +++ semantics.json | 4 ++++ styles/image-hotspots.css | 7 +++++++ 42 files changed, 131 insertions(+) diff --git a/language/.en.json b/language/.en.json index 28878e4..7030851 100644 --- a/language/.en.json +++ b/language/.en.json @@ -29,6 +29,9 @@ { "label": "Minus" }, + { + "label": "Number" + }, { "label": "Times" }, diff --git a/language/af.json b/language/af.json index 28878e4..7030851 100644 --- a/language/af.json +++ b/language/af.json @@ -29,6 +29,9 @@ { "label": "Minus" }, + { + "label": "Number" + }, { "label": "Times" }, diff --git a/language/ar.json b/language/ar.json index ee106dd..6513a6d 100644 --- a/language/ar.json +++ b/language/ar.json @@ -29,6 +29,9 @@ { "label": "Minus" }, + { + "label": "Number" + }, { "label": "Times" }, diff --git a/language/bs.json b/language/bs.json index 28878e4..7030851 100644 --- a/language/bs.json +++ b/language/bs.json @@ -29,6 +29,9 @@ { "label": "Minus" }, + { + "label": "Number" + }, { "label": "Times" }, diff --git a/language/ca.json b/language/ca.json index 28878e4..7030851 100644 --- a/language/ca.json +++ b/language/ca.json @@ -29,6 +29,9 @@ { "label": "Minus" }, + { + "label": "Number" + }, { "label": "Times" }, diff --git a/language/cs.json b/language/cs.json index 28878e4..7030851 100644 --- a/language/cs.json +++ b/language/cs.json @@ -29,6 +29,9 @@ { "label": "Minus" }, + { + "label": "Number" + }, { "label": "Times" }, diff --git a/language/da.json b/language/da.json index 28878e4..7030851 100644 --- a/language/da.json +++ b/language/da.json @@ -29,6 +29,9 @@ { "label": "Minus" }, + { + "label": "Number" + }, { "label": "Times" }, diff --git a/language/de.json b/language/de.json index 032ae53..8001122 100644 --- a/language/de.json +++ b/language/de.json @@ -29,6 +29,9 @@ { "label": "Minus" }, + { + "label": "Number" + }, { "label": "Malzeichen (X)" }, diff --git a/language/el.json b/language/el.json index 8422eb4..2994e7e 100644 --- a/language/el.json +++ b/language/el.json @@ -29,6 +29,9 @@ { "label": "Μείον" }, + { + "label": "Number" + }, { "label": "Επί" }, diff --git a/language/es-mx.json b/language/es-mx.json index 363bb3a..c7bb1ea 100644 --- a/language/es-mx.json +++ b/language/es-mx.json @@ -29,6 +29,9 @@ { "label": "Minus" }, + { + "label": "Number" + }, { "label": "Times" }, diff --git a/language/es.json b/language/es.json index 363bb3a..c7bb1ea 100644 --- a/language/es.json +++ b/language/es.json @@ -29,6 +29,9 @@ { "label": "Minus" }, + { + "label": "Number" + }, { "label": "Times" }, diff --git a/language/et.json b/language/et.json index 1525905..da73b4a 100644 --- a/language/et.json +++ b/language/et.json @@ -29,6 +29,9 @@ { "label": "Miinus" }, + { + "label": "Number" + }, { "label": "Ajad" }, diff --git a/language/eu.json b/language/eu.json index 92278d5..c44c494 100644 --- a/language/eu.json +++ b/language/eu.json @@ -29,6 +29,9 @@ { "label": "Kendu" }, + { + "label": "Number" + }, { "label": "Biderkatu" }, diff --git a/language/fi.json b/language/fi.json index e723f48..6f79e3a 100644 --- a/language/fi.json +++ b/language/fi.json @@ -29,6 +29,9 @@ { "label": "Miinus-merkki" }, + { + "label": "Number" + }, { "label": "Kertolaskumerkki" }, diff --git a/language/fr.json b/language/fr.json index bdfd00d..7e1a46d 100644 --- a/language/fr.json +++ b/language/fr.json @@ -29,6 +29,9 @@ { "label": "Minus" }, + { + "label": "Number" + }, { "label": "Times" }, diff --git a/language/he.json b/language/he.json index d0d5d28..dccdac2 100644 --- a/language/he.json +++ b/language/he.json @@ -29,6 +29,9 @@ { "label": "מינוס" }, + { + "label": "Number" + }, { "label": "כפול" }, diff --git a/language/hu.json b/language/hu.json index 28878e4..7030851 100644 --- a/language/hu.json +++ b/language/hu.json @@ -29,6 +29,9 @@ { "label": "Minus" }, + { + "label": "Number" + }, { "label": "Times" }, diff --git a/language/it.json b/language/it.json index 318d96d..baa9516 100644 --- a/language/it.json +++ b/language/it.json @@ -29,6 +29,9 @@ { "label": "Minus" }, + { + "label": "Number" + }, { "label": "Times" }, diff --git a/language/ja.json b/language/ja.json index c4eab78..92ad2d5 100644 --- a/language/ja.json +++ b/language/ja.json @@ -29,6 +29,9 @@ { "label": "Minus" }, + { + "label": "Number" + }, { "label": "Times" }, diff --git a/language/ko.json b/language/ko.json index 28878e4..7030851 100644 --- a/language/ko.json +++ b/language/ko.json @@ -29,6 +29,9 @@ { "label": "Minus" }, + { + "label": "Number" + }, { "label": "Times" }, diff --git a/language/nb.json b/language/nb.json index 1487480..90c8531 100644 --- a/language/nb.json +++ b/language/nb.json @@ -29,6 +29,9 @@ { "label": "Minus" }, + { + "label": "Number" + }, { "label": "Times" }, diff --git a/language/nl.json b/language/nl.json index 3c349ba..60c5460 100644 --- a/language/nl.json +++ b/language/nl.json @@ -29,6 +29,9 @@ { "label": "Minus" }, + { + "label": "Number" + }, { "label": "Times" }, diff --git a/language/nn.json b/language/nn.json index 28878e4..7030851 100644 --- a/language/nn.json +++ b/language/nn.json @@ -29,6 +29,9 @@ { "label": "Minus" }, + { + "label": "Number" + }, { "label": "Times" }, diff --git a/language/pl.json b/language/pl.json index 28878e4..7030851 100644 --- a/language/pl.json +++ b/language/pl.json @@ -29,6 +29,9 @@ { "label": "Minus" }, + { + "label": "Number" + }, { "label": "Times" }, diff --git a/language/pt-br.json b/language/pt-br.json index 1fd6650..81f947b 100644 --- a/language/pt-br.json +++ b/language/pt-br.json @@ -29,6 +29,9 @@ { "label": "Menos" }, + { + "label": "Number" + }, { "label": "Vezes" }, diff --git a/language/pt.json b/language/pt.json index 3b368ad..5e4e82d 100644 --- a/language/pt.json +++ b/language/pt.json @@ -29,6 +29,9 @@ { "label": "Minus" }, + { + "label": "Number" + }, { "label": "Times" }, diff --git a/language/ro.json b/language/ro.json index 28878e4..7030851 100644 --- a/language/ro.json +++ b/language/ro.json @@ -29,6 +29,9 @@ { "label": "Minus" }, + { + "label": "Number" + }, { "label": "Times" }, diff --git a/language/ru.json b/language/ru.json index 90524a8..b236ba2 100644 --- a/language/ru.json +++ b/language/ru.json @@ -29,6 +29,9 @@ { "label": "Minus" }, + { + "label": "Number" + }, { "label": "Times" }, diff --git a/language/sl.json b/language/sl.json index 010a38d..3770dbf 100644 --- a/language/sl.json +++ b/language/sl.json @@ -29,6 +29,9 @@ { "label": "-" }, + { + "label": "Number" + }, { "label": "x" }, diff --git a/language/sma.json b/language/sma.json index 28878e4..7030851 100644 --- a/language/sma.json +++ b/language/sma.json @@ -29,6 +29,9 @@ { "label": "Minus" }, + { + "label": "Number" + }, { "label": "Times" }, diff --git a/language/sme.json b/language/sme.json index 28878e4..7030851 100644 --- a/language/sme.json +++ b/language/sme.json @@ -29,6 +29,9 @@ { "label": "Minus" }, + { + "label": "Number" + }, { "label": "Times" }, diff --git a/language/smj.json b/language/smj.json index 28878e4..7030851 100644 --- a/language/smj.json +++ b/language/smj.json @@ -29,6 +29,9 @@ { "label": "Minus" }, + { + "label": "Number" + }, { "label": "Times" }, diff --git a/language/sr.json b/language/sr.json index 28878e4..7030851 100644 --- a/language/sr.json +++ b/language/sr.json @@ -29,6 +29,9 @@ { "label": "Minus" }, + { + "label": "Number" + }, { "label": "Times" }, diff --git a/language/sv.json b/language/sv.json index 28878e4..7030851 100644 --- a/language/sv.json +++ b/language/sv.json @@ -29,6 +29,9 @@ { "label": "Minus" }, + { + "label": "Number" + }, { "label": "Times" }, diff --git a/language/tr.json b/language/tr.json index 28878e4..7030851 100644 --- a/language/tr.json +++ b/language/tr.json @@ -29,6 +29,9 @@ { "label": "Minus" }, + { + "label": "Number" + }, { "label": "Times" }, diff --git a/language/uk.json b/language/uk.json index 26dd19c..530cf59 100644 --- a/language/uk.json +++ b/language/uk.json @@ -29,6 +29,9 @@ { "label": "Мінус" }, + { + "label": "Number" + }, { "label": "Час" }, diff --git a/language/vi.json b/language/vi.json index 28878e4..7030851 100644 --- a/language/vi.json +++ b/language/vi.json @@ -29,6 +29,9 @@ { "label": "Minus" }, + { + "label": "Number" + }, { "label": "Times" }, diff --git a/language/zh-hans.json b/language/zh-hans.json index 8f50ecf..826f633 100644 --- a/language/zh-hans.json +++ b/language/zh-hans.json @@ -29,6 +29,9 @@ { "label": "Minus" }, + { + "label": "Number" + }, { "label": "Times" }, diff --git a/language/zh-hant.json b/language/zh-hant.json index 3fde880..58ff732 100644 --- a/language/zh-hant.json +++ b/language/zh-hant.json @@ -29,6 +29,9 @@ { "label": "Minus" }, + { + "label": "Number" + }, { "label": "Times" }, diff --git a/language/zh-tw.json b/language/zh-tw.json index d183309..bc75c84 100644 --- a/language/zh-tw.json +++ b/language/zh-tw.json @@ -29,6 +29,9 @@ { "label": "Minus" }, + { + "label": "Number" + }, { "label": "Times" }, diff --git a/semantics.json b/semantics.json index c451822..f0ebf04 100644 --- a/semantics.json +++ b/semantics.json @@ -55,6 +55,10 @@ "value": "minus", "label": "Minus" }, + { + "value": "number", + "label": "Number" + }, { "value": "times", "label": "Times" diff --git a/styles/image-hotspots.css b/styles/image-hotspots.css index 9eee11c..ef51727 100644 --- a/styles/image-hotspots.css +++ b/styles/image-hotspots.css @@ -56,6 +56,13 @@ line-height: 1.2em; margin: 0 0.1em; } +.h5p-image-hotspots-container { + counter-reset: hotspot; +} +.h5p-image-hotspot-number:before { + counter-increment: hotspot; + content: counter(hotspot); +} .h5p-image-hotspot-plus:before { content: '\f055'; } From b408e5411537dc2cb739d16284533a933ca6742b Mon Sep 17 00:00:00 2001 From: Jonathan Hedstrom Date: Tue, 3 Dec 2019 13:47:20 -0800 Subject: [PATCH 2/2] Removes sorting so numbers display in the order entered. --- scripts/image-hotspots.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/scripts/image-hotspots.js b/scripts/image-hotspots.js index 0f89f06..af68277 100644 --- a/scripts/image-hotspots.js +++ b/scripts/image-hotspots.js @@ -104,14 +104,6 @@ H5P.ImageHotspots = (function ($, EventDispatcher) { return -1; } - // Order top-to-bottom, left-to-right - if (a.position.y !== b.position.y) { - return a.position.y < b.position.y ? -1 : 1; - } - else { - // a and b y position is equal, sort on x - return a.position.x < b.position.x ? -1 : 1; - } }); for (var i=0; i