diff options
Diffstat (limited to 'viewer/src/services')
-rw-r--r-- | viewer/src/services/indexfactory.ts | 2 | ||||
-rw-r--r-- | viewer/src/services/indexsearch.ts | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/viewer/src/services/indexfactory.ts b/viewer/src/services/indexfactory.ts index c4b6d51..4b28a60 100644 --- a/viewer/src/services/indexfactory.ts +++ b/viewer/src/services/indexfactory.ts | |||
@@ -23,7 +23,7 @@ import Navigation from "@/services/navigation"; | |||
23 | 23 | ||
24 | export default class IndexFactory { | 24 | export default class IndexFactory { |
25 | public static generateTags(root: Gallery.Item | null): Tag.Index { | 25 | public static generateTags(root: Gallery.Item | null): Tag.Index { |
26 | let tagsIndex: Tag.Index = {}; | 26 | const tagsIndex: Tag.Index = {}; |
27 | if (root) IndexFactory.pushTagsForItem(tagsIndex, root); | 27 | if (root) IndexFactory.pushTagsForItem(tagsIndex, root); |
28 | return tagsIndex; | 28 | return tagsIndex; |
29 | } | 29 | } |
diff --git a/viewer/src/services/indexsearch.ts b/viewer/src/services/indexsearch.ts index e6d7eed..00f8cfc 100644 --- a/viewer/src/services/indexsearch.ts +++ b/viewer/src/services/indexsearch.ts | |||
@@ -29,7 +29,7 @@ export default class IndexSearch { | |||
29 | } | 29 | } |
30 | 30 | ||
31 | private static extractTagsByOperation(searchTags: Tag.Search[]): Tag.SearchByOperation { | 31 | private static extractTagsByOperation(searchTags: Tag.Search[]): Tag.SearchByOperation { |
32 | let byOperation: Tag.SearchByOperation = {}; | 32 | const byOperation: Tag.SearchByOperation = {}; |
33 | Object.values(Operation).forEach( | 33 | Object.values(Operation).forEach( |
34 | operation => (byOperation[operation] = searchTags.filter(tag => tag.operation === operation)) | 34 | operation => (byOperation[operation] = searchTags.filter(tag => tag.operation === operation)) |
35 | ); | 35 | ); |
@@ -37,7 +37,7 @@ export default class IndexSearch { | |||
37 | } | 37 | } |
38 | 38 | ||
39 | private static extractIntersection(byOperation: Tag.SearchByOperation): Set<Gallery.Item> { | 39 | private static extractIntersection(byOperation: Tag.SearchByOperation): Set<Gallery.Item> { |
40 | let intersection = new Set<Gallery.Item>(); | 40 | const intersection = new Set<Gallery.Item>(); |
41 | if (byOperation[Operation.INTERSECTION].length > 0) { | 41 | if (byOperation[Operation.INTERSECTION].length > 0) { |
42 | byOperation[Operation.INTERSECTION] | 42 | byOperation[Operation.INTERSECTION] |
43 | .map(tag => tag.items) | 43 | .map(tag => tag.items) |
@@ -49,7 +49,7 @@ export default class IndexSearch { | |||
49 | } | 49 | } |
50 | 50 | ||
51 | private static extractSubstraction(byOperation: Tag.SearchByOperation): Set<Gallery.Item> { | 51 | private static extractSubstraction(byOperation: Tag.SearchByOperation): Set<Gallery.Item> { |
52 | let substraction = new Set<Gallery.Item>(); | 52 | const substraction = new Set<Gallery.Item>(); |
53 | if (byOperation[Operation.SUBSTRACTION].length > 0) { | 53 | if (byOperation[Operation.SUBSTRACTION].length > 0) { |
54 | byOperation[Operation.SUBSTRACTION].flatMap(tag => tag.items).forEach(item => substraction.add(item)); | 54 | byOperation[Operation.SUBSTRACTION].flatMap(tag => tag.items).forEach(item => substraction.add(item)); |
55 | } | 55 | } |