File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 1616* ` ggplotly() ` now respects ` guide(aes = "none") ` (e.g., ` guide(fill = "none") ` ) when constructing legend entries. (#2067 )
1717* Fixed an issue with translating ` GGally::ggcorr() ` via ` ggplotly() ` . (#2012 )
1818* Fixed an issue where clearing a crosstalk filter would raise an error in the JS console (#2087 )
19+ * Fixed an issue with ` {crosstalk} ` where running ` selectionHandle.clear() ` from another visual causes plotly to throw an error. (#2098 )
20+
1921
2022## Improvements
2123
Original file line number Diff line number Diff line change @@ -628,15 +628,15 @@ TraceManager.prototype.updateFilter = function(group, keys) {
628628} ;
629629
630630TraceManager . prototype . updateSelection = function ( group , keys ) {
631-
632- if ( keys !== null && ! Array . isArray ( keys ) ) {
631+
632+ if ( keys !== null && keys !== undefined && ! Array . isArray ( keys ) ) {
633633 throw new Error ( "Invalid keys argument; null or array expected" ) ;
634634 }
635635
636636 // if selection has been cleared, or if this is transient
637637 // selection, delete the "selection traces"
638638 var nNewTraces = this . gd . data . length - this . origData . length ;
639- if ( keys === null || ! this . highlight . persistent && nNewTraces > 0 ) {
639+ if ( keys === null || keys === undefined || ! this . highlight . persistent && nNewTraces > 0 ) {
640640 var tracesToRemove = [ ] ;
641641 for ( var i = 0 ; i < this . gd . data . length ; i ++ ) {
642642 if ( this . gd . data [ i ] . _isCrosstalkTrace ) tracesToRemove . push ( i ) ;
@@ -655,7 +655,7 @@ TraceManager.prototype.updateSelection = function(group, keys) {
655655 }
656656 }
657657
658- if ( keys === null ) {
658+ if ( keys === null || keys === undefined ) {
659659
660660 Plotly . restyle ( this . gd , { "opacity" : this . origOpacity } ) ;
661661
You can’t perform that action at this time.
0 commit comments