Skip to content

Commit 1ab7ad5

Browse files
committed
be a bit more strict about what qualifies for dashRmode
1 parent d88594f commit 1ab7ad5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

inst/htmlwidgets/plotly.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,10 @@ HTMLWidgets.widget({
303303

304304
// send user input event data to dashR
305305
// TODO: make this more consistent with Graph() props?
306-
if (typeof el.setProps === "function") {
306+
var dashRwidgets = window.dashRwidgets || {};
307+
var dashRmode = typeof el.setProps === "function" &&
308+
typeof dashRwidgets.htmlwidget === "function";
309+
if (dashRmode) {
307310
graphDiv.on('plotly_relayout', function(d) {
308311
el.setProps({"input_plotly_relayout": d});
309312
});

0 commit comments

Comments
 (0)