File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -230,6 +230,12 @@ HTMLWidgets.widget({
230230 x : pt . x ,
231231 y : pt . y
232232 } ;
233+
234+ // If 'z' is reported with the event data, then use it!
235+ if ( pt . hasOwnProperty ( "z" ) ) {
236+ obj . z = pt . z ;
237+ }
238+
233239 /*
234240 TL;DR: (I think) we have to select the graph div (again) to attach keys...
235241
@@ -243,15 +249,12 @@ HTMLWidgets.widget({
243249 var gd = document . getElementById ( el . id ) ;
244250 var trace = gd . data [ pt . curveNumber ] ;
245251
246- // Heatmap z event data should derive from _z calc attribute
247- // https://github.com/ropensci/plotly/issues/1141
248- var z = trace . type === "heatmap" ? "_z" : "z" ;
249252 if ( ! trace . _isSimpleKey ) {
250- var attrsToAttach = [ "key" , z ] ;
253+ var attrsToAttach = [ "key" ] ;
251254 } else {
252255 // simple keys fire the whole key
253256 obj . key = trace . key ;
254- var attrsToAttach = [ z ] ;
257+ var attrsToAttach = [ ] ;
255258 }
256259
257260 for ( var i = 0 ; i < attrsToAttach . length ; i ++ ) {
You can’t perform that action at this time.
0 commit comments