Skip to content

Commit

Permalink
Do not export .generateOutput
Browse files Browse the repository at this point in the history
  • Loading branch information
RiboRings committed Jun 28, 2024
1 parent cf5ae83 commit 7eab2ab
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 16 deletions.
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ importFrom(shiny,plotOutput)
importFrom(shiny,renderPlot)
importFrom(shinyWidgets,addSpinner)
importFrom(utils,stack)
importMethodsFrom(iSEE,.exportOutput)
importMethodsFrom(iSEE,.generateOutput)
importMethodsFrom(iSEE,.panelColor)
importMethodsFrom(iSEE,.renderOutput)
9 changes: 6 additions & 3 deletions R/class-AbundanceDensityPlot.R
Original file line number Diff line number Diff line change
Expand Up @@ -236,15 +236,18 @@ setMethod(".renderOutput", "AbundanceDensityPlot",
callNextMethod()
})

#' @export
#' @importFrom grDevices pdf dev.off
setMethod(".exportOutput", "AbundanceDensityPlot",
function(x, se, all_memory, all_contents) {

contents <- .generateOutput(x, se, all_memory=all_memory, all_contents=all_contents)
contents <- .generateOutput(x, se, all_memory=all_memory,
all_contents=all_contents)

newpath <- paste0(.getEncodedName(x), ".pdf")

pdf(newpath, width=slot(x, "PanelHeight")/75, height=slot(x, "PanelWidth")*2)
pdf(newpath, width=slot(x, "PanelHeight") / 75,
height=slot(x, "PanelWidth") * 2)

print(contents$plot)
dev.off()

Expand Down
9 changes: 6 additions & 3 deletions R/class-AbundancePlot.R
Original file line number Diff line number Diff line change
Expand Up @@ -205,15 +205,18 @@ setMethod(".renderOutput", "AbundancePlot",
callNextMethod()
})

#' @export
#' @importFrom grDevices pdf dev.off
setMethod(".exportOutput", "AbundancePlot",
function(x, se, all_memory, all_contents) {

contents <- .generateOutput(x, se, all_memory=all_memory, all_contents=all_contents)
contents <- .generateOutput(x, se, all_memory=all_memory,
all_contents=all_contents)

newpath <- paste0(.getEncodedName(x), ".pdf")

pdf(newpath, width=slot(x, "PanelHeight")/75, height=slot(x, "PanelWidth")*2)
pdf(newpath, width=slot(x, "PanelHeight") / 75,
height=slot(x, "PanelWidth") * 2)

print(contents$plot)
dev.off()

Expand Down
9 changes: 6 additions & 3 deletions R/class-RDAPlot.R
Original file line number Diff line number Diff line change
Expand Up @@ -264,15 +264,18 @@ setMethod(".renderOutput", "RDAPlot",
callNextMethod()
})

#' @export
#' @importFrom grDevices pdf dev.off
setMethod(".exportOutput", "RDAPlot",
function(x, se, all_memory, all_contents) {

contents <- .generateOutput(x, se, all_memory=all_memory, all_contents=all_contents)
contents <- .generateOutput(x, se, all_memory=all_memory,
all_contents=all_contents)

newpath <- paste0(.getEncodedName(x), ".pdf")

pdf(newpath, width=slot(x, "PanelHeight")/75, height=slot(x, "PanelWidth")*2)
pdf(newpath, width=slot(x, "PanelHeight") / 75,
height=slot(x, "PanelWidth") * 2)

print(contents$plot)
dev.off()

Expand Down
15 changes: 9 additions & 6 deletions R/class-RowTreePlot.R
Original file line number Diff line number Diff line change
Expand Up @@ -232,18 +232,21 @@ setMethod(".renderOutput", "RowTreePlot",
callNextMethod()
})

#' @export
#' @importFrom grDevices pdf dev.off
setMethod(".exportOutput", "RowTreePlot",
function(x, se, all_memory, all_contents) {

contents <- .generateOutput(x, se, all_memory=all_memory, all_contents=all_contents)

contents <- .generateOutput(x, se, all_memory=all_memory,
all_contents=all_contents)

newpath <- paste0(.getEncodedName(x), ".pdf")

pdf(newpath, width=slot(x, "PanelHeight")/75, height=slot(x, "PanelWidth")*2)

pdf(newpath, width=slot(x, "PanelHeight") / 75,
height=slot(x, "PanelWidth") * 2)

print(contents$plot)
dev.off()

newpath
})

Expand Down

0 comments on commit 7eab2ab

Please sign in to comment.