@@ -33,7 +33,7 @@ HTMLWidgets.widget({
33
33
34
34
// Enable persistent selection when shift key is down
35
35
// https://stackoverflow.com/questions/1828613/check-if-a-key-is-down
36
- var persistOnShift = function ( e ) {
36
+ var persistOnShift = function ( e ) {
37
37
if ( ! e ) window . event ;
38
38
if ( e . shiftKey ) {
39
39
x . highlight . persistent = true ;
@@ -609,7 +609,7 @@ TraceManager.prototype.updateSelection = function(group, keys) {
609
609
/ (2) highlight(selected = attrs_selected(...))
610
610
*/
611
611
// TODO: it would be neat to have a dropdown to dynamically specify these!
612
- $ . extend ( true , trace , this . highlight . selected , d . selected ) ;
612
+ $ . extend ( true , trace , this . highlight . selected ) ;
613
613
614
614
// if it is defined, override color with the "dynamic brush color""
615
615
if ( d . marker ) {
@@ -721,9 +721,8 @@ TraceManager.prototype.updateSelection = function(group, keys) {
721
721
722
722
if ( tracesToDim . length > 0 ) {
723
723
Plotly . restyle ( this . gd , { "opacity" : opacities } , tracesToDim ) ;
724
- // this is an unfortunate consequence of the selected/unselected API
725
- // https://codepen.io/cpsievert/pen/opOawp
726
- Plotly . restyle ( this . gd , { "unselected" : { "marker" : { "opacity" : 1 } } } ) ;
724
+ // turn off the selected/unselected API
725
+ Plotly . restyle ( gd , { "selectedpoints" : null } ) ;
727
726
}
728
727
729
728
}
0 commit comments