Skip to content

Commit

Permalink
Fix annotation caching issue by fixing initialization
Browse files Browse the repository at this point in the history
This might fix #637
  • Loading branch information
Splines committed Aug 3, 2024
1 parent 7f2a9bd commit b98e4a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class AnnotationManager {
This method is e.g. used when a new annotation is being created.
Don't mix up with updateMarkers() which just updates the position of the markers!
onSucess = A function that is triggered when the annotations have been
onSuccess = A function that is triggered when the annotations have been
successfully updated.
onSuccess = A function that is triggered when the annotations have been
successfully updated.
Expand Down
3 changes: 3 additions & 0 deletions app/assets/javascripts/thyme/thyme_player.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ $(document).on("turbolinks:load", function () {
onClick, onUpdate, isValid);
thymeAttributes.annotationManager = annotationManager;

// update annotations manually once as initialization
annotationManager.updateAnnotations();

// Update annotations after deleting an annotation
const ANNOTATION_DELETE_SELECTOR = "#annotation-delete-button";
$(document).on("click", ANNOTATION_DELETE_SELECTOR, function () {
Expand Down

0 comments on commit b98e4a0

Please sign in to comment.