Out of the box, Mirador does not support an observer pattern to detect changes happening in the application. A (hacky) way around this is to build our own observer in TAV that observes the Mirador Redux Store and checks whether the prev value of a part of Mirador is different from the curr value. Currently, we will use this custom observer to check whether the canvasId changes, which indicates that the user pressed the prev/next button in Mirador or jumped to an image through the gallery view. When this change has been detected, TAV will load in the new text and annotations.
Inspiration:
Out of the box, Mirador does not support an observer pattern to detect changes happening in the application. A (hacky) way around this is to build our own observer in TAV that observes the Mirador Redux Store and checks whether the
prev
value of a part of Mirador is different from thecurr
value. Currently, we will use this custom observer to check whether thecanvasId
changes, which indicates that the user pressed the prev/next button in Mirador or jumped to an image through the gallery view. When this change has been detected, TAV will load in the new text and annotations.