Skip to content

Commit

Permalink
Made metadataBefore() and metadataAfter() private.
Browse files Browse the repository at this point in the history
  • Loading branch information
Frodo161 committed Sep 15, 2023
1 parent 2ea0b2d commit 4bd1451
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/assets/javascripts/thyme/metadata_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ class MetadataManager {

/* returns the jQuery object of all metadata elements that start before the
given time in seconds */
metadataBefore(seconds) {
return $('[id^="m-"]').not(this.metadataAfter(seconds));
#metadataBefore(seconds) {
return $('[id^="m-"]').not(this.#metadataAfter(seconds));
}

/* returns the jQuery object of all metadata elements that start after the
given time in seconds */
metadataAfter(seconds) {
#metadataAfter(seconds) {
const metaList = document.getElementById(this.metadataListId);
const times = JSON.parse(metaList.dataset.times);
if (times.length === 0) {
Expand All @@ -60,8 +60,8 @@ class MetadataManager {
/* for a given time, show all metadata elements that start before this time
and hide all that start later */
metaIntoView(time) {
this.metadataAfter(time).hide();
const $before = this.metadataBefore(time);
this.#metadataAfter(time).hide();
const $before = this.#metadataBefore(time);
$before.show();
const previousLength = $before.length;
if (previousLength > 0) {
Expand Down

0 comments on commit 4bd1451

Please sign in to comment.