File tree Expand file tree Collapse file tree 2 files changed +36
-4
lines changed Expand file tree Collapse file tree 2 files changed +36
-4
lines changed Original file line number Diff line number Diff line change @@ -376,15 +376,13 @@ function doSingleLeaveHover(el) {
376
376
// `setStyle` but not `extendFrom(stl, true)`.
377
377
el . setStyle ( normalStl ) ;
378
378
applyDefaultTextStyle ( style ) ;
379
- el . __cachedNormalStl = null ;
380
379
}
381
380
// `__cachedNormalZ2` will not be reset if calling `setElementHoverStyle`
382
381
// when `el` is on emphasis state. So here by comparing with 1, we try
383
382
// hard to make the bug case rare.
384
383
var normalZ2 = el . __cachedNormalZ2 ;
385
- if ( el . z2 - normalZ2 === Z2_LIFT_VALUE ) {
384
+ if ( normalZ2 != null && el . z2 - normalZ2 === Z2_LIFT_VALUE ) {
386
385
el . z2 = normalZ2 ;
387
- el . __cachedNormalZ2 = null ;
388
386
}
389
387
}
390
388
}
Original file line number Diff line number Diff line change 56
56
57
57
< div id ="mainb1 "> </ div >
58
58
< div id ="mainb2 "> </ div >
59
+ < div id ="mainb3 "> </ div >
59
60
60
61
< div id ="main0 "> </ div >
61
62
< div id ="main1 "> </ div >
84
85
85
86
function genInfo ( zrRefreshTimestamp ) {
86
87
infoEl . innerHTML = [
87
- useHoverLayer ? 'Using HoverLayer' : 'NOT using HoverLayer' ,
88
+ '<span style="color:yellow">'
89
+ + ( useHoverLayer ? 'Using HoverLayer' : 'NOT using HoverLayer' )
90
+ + '</span>' ,
88
91
'hoverLayerThreshold: ' + hoverLayerThreshold ,
89
92
'zr refresh base layer at: <span style="color:yellow">' + ( zrRefreshTimestamp || null ) + '</span>'
90
93
] . join ( '<br>' ) ;
231
234
232
235
233
236
237
+ < script >
238
+ require ( [ 'echarts' ] , function ( echarts ) {
239
+ var option = {
240
+ hoverLayerThreshold : hoverLayerThreshold ,
241
+ xAxis : {
242
+ } ,
243
+ yAxis : {
244
+ } ,
245
+ series : [ {
246
+ type : 'scatter' ,
247
+ symbolSize : 100 ,
248
+ data : [
249
+ { value : [ 0 , 0 ] , itemStyle : { color : 'blue' } } ,
250
+ { value : [ 0 , 1 ] , itemStyle : { color : 'red' } }
251
+ ]
252
+ } ]
253
+ } ;
254
+
255
+ var chart = testHelper . create ( echarts , 'mainb3' , {
256
+ title : [
257
+ 'hover the blue symbol, the z2 can be top' ,
258
+ 'unhover, **z2 should be back** to bottom'
259
+ ] ,
260
+ option : option ,
261
+ height : 200
262
+ } ) ;
263
+ } ) ;
264
+ </ script >
265
+
266
+
267
+
234
268
< script >
235
269
require ( [ 'echarts' ] , function ( echarts ) {
236
270
var option = {
You can’t perform that action at this time.
0 commit comments