@christianriedl/media 1.0.208 → 1.0.209
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/BookPlace.vue +14 -19
package/package.json
CHANGED
|
@@ -13,31 +13,26 @@
|
|
|
13
13
|
const textHinten = computed (() => buildText (place.hinten, place.hinten2, place.hintenSelFrom, place.hintenSelTo));
|
|
14
14
|
|
|
15
15
|
function buildText (buchstaben: string, buchstaben2: string, selFrom?: number, selTo?: number) : string {
|
|
16
|
-
let
|
|
17
|
-
|
|
16
|
+
let text1 = buchstaben;
|
|
17
|
+
let text2 = buchstaben2;
|
|
18
|
+
if (selFrom !== undefined && selTo !== undefined)
|
|
18
19
|
{
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
if (i >= selFrom && i <= selTo) {
|
|
24
|
-
text += `<span style="color: red; font-weight: 900">${buchstabe}</span>`;
|
|
20
|
+
selTo++;
|
|
21
|
+
if (selFrom > 0) {
|
|
22
|
+
text1 = '<span>' + buchstaben.substring(0, selFrom) + '</span>';
|
|
23
|
+
text2 = '<span>' + buchstaben2.substring(0, selFrom) + '</span>';
|
|
25
24
|
}
|
|
26
25
|
else {
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
text += "<br>";
|
|
31
|
-
for (let i = 0; i < buchstaben2.length; i++) {
|
|
32
|
-
const buchstabe = buchstaben2.substring(i, i+1);
|
|
33
|
-
if (i >= selFrom && i <= selTo) {
|
|
34
|
-
text += `<span style="color: red; font-weight: 900">${buchstabe}</span>`;
|
|
26
|
+
text1 = text2 = '';
|
|
35
27
|
}
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
text1 += '<span style="color: red; font-weight: 900">' + buchstaben.substring(selFrom, selTo) + '</span>';
|
|
29
|
+
text2 += '<span style="color: red; font-weight: 900">' + buchstaben2.substring(selFrom, selTo) + '</span>';
|
|
30
|
+
if (selTo < buchstaben.length) {
|
|
31
|
+
text1 += '<span>' + buchstaben.substring(selTo) + '</span>';
|
|
32
|
+
text2 += '<span>' + buchstaben2.substring(selTo) + '</span>';
|
|
38
33
|
}
|
|
39
34
|
}
|
|
40
|
-
return
|
|
35
|
+
return text1 + "<br>" + text2;
|
|
41
36
|
}
|
|
42
37
|
|
|
43
38
|
function selectVorne () {
|