Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
traversc committed Apr 7, 2023
1 parent a0b60f1 commit 7ed17c7
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 13 deletions.
16 changes: 8 additions & 8 deletions R/glow_functions.r
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ GlowMapper <- R6Class("GlowMapper", list(
self$x_aspect_ratio <- max(xincrement / yincrement,1)
self$y_aspect_ratio <- max(yincrement / xincrement,1)

if(class(radius) == "relx") {
if(inherits(radius, "relx")) {
class(radius) <- NULL
radius <- xdiff * radius / self$x_aspect_ratio
} else if(class(radius) == "rely") {
} else if(inherits(radius, "rely")) {
class(radius) <- NULL
radius <- ydiff * radius / self$y_aspect_ratio
} else {
Expand Down Expand Up @@ -276,10 +276,10 @@ GlowMapper4 <- R6Class("GlowMapper4", list(
self$y_aspect_ratio <- max(yincrement / xincrement,1)


if(class(radius) == "relx") {
if(inherits(radius, "relx")) {
class(radius) <- NULL
radius <- xdiff * radius / self$x_aspect_ratio
} else if(class(radius) == "rely") {
} else if(inherits(radius, "rely")) {
class(radius) <- NULL
radius <- ydiff * radius / self$y_aspect_ratio
} else {
Expand Down Expand Up @@ -460,10 +460,10 @@ LightMapper <- R6Class("LightMapper", list(
self$x_aspect_ratio <- max(xincrement / yincrement,1)
self$y_aspect_ratio <- max(yincrement / xincrement,1)

if(class(radius) == "relx") {
if(inherits(radius, "relx")) {
class(radius) <- NULL
radius <- xdiff * radius / self$x_aspect_ratio
} else if(class(radius) == "rely") {
} else if(inherits(radius, "rely")) {
class(radius) <- NULL
radius <- ydiff * radius / self$y_aspect_ratio
} else {
Expand Down Expand Up @@ -615,10 +615,10 @@ LightMapper4 <- R6Class("GlowMapper4", list(
self$x_aspect_ratio <- max(xincrement / yincrement,1)
self$y_aspect_ratio <- max(yincrement / xincrement,1)

if(class(radius) == "relx") {
if(inherits(radius, "relx")) {
class(radius) <- NULL
radius <- xdiff * radius / self$x_aspect_ratio
} else if(class(radius) == "rely") {
} else if(inherits(radius, "rely")) {
class(radius) <- NULL
radius <- ydiff * radius / self$y_aspect_ratio
} else {
Expand Down
20 changes: 15 additions & 5 deletions man/relxy.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7ed17c7

Please sign in to comment.