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({
230
230
x : pt . x ,
231
231
y : pt . y
232
232
} ;
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
+
233
239
/*
234
240
TL;DR: (I think) we have to select the graph div (again) to attach keys...
235
241
@@ -243,15 +249,12 @@ HTMLWidgets.widget({
243
249
var gd = document . getElementById ( el . id ) ;
244
250
var trace = gd . data [ pt . curveNumber ] ;
245
251
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" ;
249
252
if ( ! trace . _isSimpleKey ) {
250
- var attrsToAttach = [ "key" , z ] ;
253
+ var attrsToAttach = [ "key" ] ;
251
254
} else {
252
255
// simple keys fire the whole key
253
256
obj . key = trace . key ;
254
- var attrsToAttach = [ z ] ;
257
+ var attrsToAttach = [ ] ;
255
258
}
256
259
257
260
for ( var i = 0 ; i < attrsToAttach . length ; i ++ ) {
You can’t perform that action at this time.
0 commit comments