File tree Expand file tree Collapse file tree
src/content-handlers/iiif
extensions/uv-openseadragon-extension
modules/uv-openseadragoncenterpanel-module Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ export class ChoiceSwitchDialogue extends BaseChoiceSwitchDialogue {
8686 } ) ;
8787
8888 const mobileFooterButton = extension . mobileFooterPanel ?. $choiceSwitchButton ;
89+
8990 this . $anchor =
9091 mobileFooterButton ?. is ( ":visible" ) && mobileFooterButton ?. length
9192 ? mobileFooterButton
Original file line number Diff line number Diff line change @@ -620,16 +620,14 @@ export default class OpenSeadragonExtension extends BaseExtension<Config> {
620620 this . footerPanel . init ( ) ;
621621 }
622622
623- if ( this . helper . hasChoices ( ) ) {
624- this . $choiceSwitchDialogue = $ (
625- '<div class="overlay choiceSwitch" aria-hidden="true"></div>'
626- ) ;
627- this . shell . $overlays . append ( this . $choiceSwitchDialogue ) ;
628- this . choiceSwitchDialogue = new ChoiceSwitchDialogue (
629- this . $choiceSwitchDialogue ,
630- this . shell
631- ) ;
632- }
623+ this . $choiceSwitchDialogue = $ (
624+ '<div class="overlay choiceSwitch" aria-hidden="true"></div>'
625+ ) ;
626+ this . shell . $overlays . append ( this . $choiceSwitchDialogue ) ;
627+ this . choiceSwitchDialogue = new ChoiceSwitchDialogue (
628+ this . $choiceSwitchDialogue ,
629+ this . shell
630+ ) ;
633631 }
634632
635633 render ( ) : void {
Original file line number Diff line number Diff line change @@ -636,6 +636,8 @@ export class OpenSeadragonCenterPanel extends CenterPanel<
636636 this . hidePrevButton ( ) ;
637637 this . hideNextButton ( ) ;
638638
639+ this . createChoiceSwitch ( ) ;
640+
639641 this . isCreated = true ;
640642 //this.resize();
641643
@@ -659,8 +661,6 @@ export class OpenSeadragonCenterPanel extends CenterPanel<
659661 { capture : true }
660662 ) ;
661663
662- this . createChoiceSwitch ( ) ;
663-
664664 this . extensionHost . subscribe ( IIIFEvents . CLOSE_ACTIVE_DIALOGUE , ( ) => {
665665 this . $viewer . removeClass ( "dialogue-open" ) ;
666666 } ) ;
@@ -773,15 +773,9 @@ export class OpenSeadragonCenterPanel extends CenterPanel<
773773 }
774774
775775 createChoiceSwitch ( ) : void {
776- // check for a choice on either of the displayed canvases if in 2-up view
777- const indices = this . extension . getPagedIndices ( ) ;
778- const hasChoices = this . indicesIncludeChoices ( indices ) ;
779-
780- if ( ! hasChoices ) return ;
781-
782776 this . $choiceSwitchButton = this . $rotateButton . clone ( ) ;
783- this . $choiceSwitchButton . attr ( "title" , this . content . layers ) ;
784777 this . $choiceSwitchButton . attr ( "aria-label" , this . content . layers ) ;
778+ this . $choiceSwitchButton . attr ( "title" , this . content . layers ) ;
785779 this . $choiceSwitchButton . switchClass ( "rotate" , "choiceSwitch" ) ;
786780 this . $choiceSwitchButton . attr ( "tabindex" , 0 ) ;
787781
You can’t perform that action at this time.
0 commit comments