Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.18.2 (bugfix) #43

Merged
merged 18 commits into from
Jan 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: canvasXpress
Version: 1.18.1
Version: 1.18.2
Title: Visualization Package for CanvasXpress in R
Description: Enables creation of visualizations using the CanvasXpress framework
in R. CanvasXpress is a standalone JavaScript library for reproducible research
Expand All @@ -19,7 +19,7 @@ URL:
BugReports:
https://github.com/neuhausi/canvasXpress/issues
Depends:
R (>= 3.3.2)
R (>= 3.3.0)
Imports:
htmlwidgets (>= 0.8)
RoxygenNote: 6.0.1
Expand Down
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ information on changes to the stand-alone JavaScript CanvasXpress library see th

---

## v1.18.2
* Bugfix for destruction of htmlwidget

## v1.18.1
* Updated CanvasXpress JavaScript and CSS libraries to v18.1
* Added destroy functionality for shiny applications the require removal of canvasXpress charts
Expand Down
8 changes: 4 additions & 4 deletions R/canvasXpress.R
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,11 @@ canvasXpress <- function(data = NULL,
pretty = pretty,
digits = digits))

htmlwidgets::createWidget("canvasXpress",
htmlwidgets::createWidget(name = "canvasXpress",
cx_object,
width = width,
height = height)
height = height,
package = "canvasXpress")
}


Expand All @@ -269,8 +270,7 @@ canvasXpress <- function(data = NULL,
#' @export
canvasXpressOutput <- function(outputId, width = "100%", height = "400px") {
htmlwidgets::shinyWidgetOutput(outputId, "canvasXpress",
width, height,
package = "canvasXpress")
width, height, package = "canvasXpress")
}


Expand Down
4 changes: 2 additions & 2 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## Comments from Maintainer

Updated internal JS libraries to 18.1 and updated htmlwidgets javascript functionality to allow destruction of the widget properly in shiny applications.
Bugfix for updated htmlwidgets javascript functionality to allow destruction of the widget properly in shiny applications on recreation.

There is a CRAN check NOTE on 2 fedora linux builds regarding patch level and support for 3.3.2, this was not fixed as I do not have access to fedora to perform proper testing across patch levels.
Fixed CRAN check NOTE on 2 fedora linux builds regarding patch level.

---

Expand Down
6 changes: 2 additions & 4 deletions inst/htmlwidgets/canvasXpress.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ HTMLWidgets.widget({
return {
id: c.id,
renderValue: function(x) {
if (x.length === 0) {
CanvasXpress.destroy(c.id);
}
else {
CanvasXpress.destroy(c.id);
if (x.length != 0) {
x.renderTo = c.id;
new CanvasXpress(x);
}
Expand Down