Examples of RmdPreviewParams


Examples of org.rstudio.studio.client.rmarkdown.model.RmdPreviewParams

      if (outputFrame_ != null &&
          outputFrame_.getWindowObject() != null &&
          newViewerType != outputFrame_.getViewerType())
      {
         // close the existing frame
         RmdPreviewParams params = outputFrame_.getPreviewParams();
         outputFrame_.closeOutputFrame(true);
        
         // reset the scroll position (as it will vary with the document width,
         // which will change)
         params.setScrollPosition(0);
        
         // open a new one with the same parameters
         outputFrame_ = createOutputFrame(newViewerType);
         outputFrame_.showRmdPreview(params);
      }
View Full Code Here

Examples of org.rstudio.studio.client.rmarkdown.model.RmdPreviewParams

      }
      if (anchors_.containsKey(keyFromResult(result)))
      {
         anchor = anchors_.get(keyFromResult(result));
      }
      final RmdPreviewParams params = RmdPreviewParams.create(
            result, scrollPosition, anchor);
     
      // don't host presentations in the viewer pane--ioslides doesn't scale
      // slides well without help
      final int newViewerType = result.isHtmlPresentation() ?
View Full Code Here

Examples of org.rstudio.studio.client.rmarkdown.model.RmdPreviewParams

   // when the window is closed, remember our position within it
   private void notifyRmdOutputClosed(JavaScriptObject closeParams)
   {
      // save anchor location for presentations and scroll position for
      // documents
      RmdPreviewParams params = closeParams.cast();
      cacheDocPosition(params.getResult(), params.getScrollPosition(),
                       params.getAnchor());
     
      // if this is a Shiny document, stop the associated process
      if (params.isShinyDocument() && !restarting_)
      {
         server_.terminateRenderRmd(true, new VoidServerRequestCallback());
      }
      shinyDoc_ = null;
   }
View Full Code Here

Examples of org.rstudio.studio.client.rmarkdown.model.RmdPreviewParams

   }

   @Override
   public void onViewerNavigated(ViewerNavigatedEvent event)
   {
      final RmdPreviewParams params = getPreviewParams();
      if (params != null &&
          params.getOutputUrl().equals(event.getURL()))
      {
         frame_ = event.getFrame();
         if (params.isShinyDocument())
         {
            shinyFrame_.initialize(
               StringUtil.makeAbsoluteUrl(params.getOutputUrl()),
               new Operation() {
                  @Override
                  public void execute()
                  {
                     shinyFrame_.setScrollPosition(
                           params.getScrollPosition());
                  }
               });
         }
         else
         {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.