4 Replies Latest reply on Feb 20, 2017 2:08 AM by gopi.gorantala

    Custom View Tile Height Not Auto-Adjusting

    almore.cato

      Hi all,

       

      I'm currently creating a custom view tile menu - the tile should function in the following way: Click menu -> Overlay menu opens up(tile resizes)   Click close button -> Overlay menu closes (tile resizes). Everything is functioning correct except the resizing part. I'm not sure what the issue is, i tried the app.resize() function initially, but when that didn't work i went to the more specefic gadget.window.adjustHeight() and i still had no luck. Any help would be appreciated, I've attached my javascript code below.

       /************************
                  BOOK BUTTON CONTROLS
              ************************/
          var openOverlay = function () {
              var docHeight = $(document).height();
              $("#overlay").addClass("overlay-shown ");
              var overlayHeight = $("#overlay").height();
              $("#closeButton").addClass("closeButtonShowed");
              $("#questionButton").addClass("questionButtonShowed");
              $("#bottomQuote").addClass("bottomQuoteShown");
              $("#navPanels").addClass("navPanelShown");
              navBarShowing = true;
              $("body").css("height", "1400");
          };
          $("#bookButton").parent().trigger('focus');
          $(document).on('click', '#sixthContentSection', function () {
              openOverlay();
              gadgets.window.adjustHeight();
          });
          /************************
              CLOSE BUTTON CONTROLS
          ************************/
          var closeOverlay = function () {
              $("#overlay").removeClass("overlay-shown ");
              $("#closeButton").removeClass("closeButtonShowed");
              $("#questionButton").removeClass("questionButtonShowed");
              $("#bottomQuote").removeClass("bottomQuoteShown");
              $("#navPanels").removeClass("navPanelShown");
              navBarShowing = false;
          };
          $(document).on('click', '#closeButton', function () {
              closeOverlay();
              gadgets.window.adjustHeight();
          });
          $("#overlay").click(function () {
              closeOverlay();
          });
      } // end function
      

      Scott A Johnson

      Ryan Rutan

      Gopi Gorantala