@@ -124,7 +124,8 @@ module.exports = function plot(gd, calcData) {
124
124
} ;
125
125
126
126
var linkHoverFollow = function ( element , d ) {
127
-
127
+ var trace = gd . _fullData [ d . traceId ] ;
128
+ var ptNumber = d . originalIndex ;
128
129
var boundingBox = element . getBoundingClientRect ( ) ;
129
130
var hoverCenterX = boundingBox . left + boundingBox . width / 2 ;
130
131
var hoverCenterY = boundingBox . top + boundingBox . height / 2 ;
@@ -138,7 +139,11 @@ module.exports = function plot(gd, calcData) {
138
139
[ 'Source:' , d . link . source . label ] . join ( ' ' ) ,
139
140
[ 'Target:' , d . link . target . label ] . join ( ' ' )
140
141
] . filter ( renderableValuePresent ) . join ( '<br>' ) ,
141
- color : Color . addOpacity ( d . tinyColorHue , 1 ) ,
142
+ color : Fx . castHoverOption ( trace , ptNumber , 'bgcolor' ) || Color . addOpacity ( d . tinyColorHue , 1 ) ,
143
+ borderColor : Fx . castHoverOption ( trace , ptNumber , 'bordercolor' ) ,
144
+ fontFamily : Fx . castHoverOption ( trace , ptNumber , 'font.family' ) ,
145
+ fontSize : Fx . castHoverOption ( trace , ptNumber , 'font.size' ) ,
146
+ fontColor : Fx . castHoverOption ( trace , ptNumber , 'font.color' ) ,
142
147
idealAlign : d3 . event . x < hoverCenterX ? 'right' : 'left'
143
148
} , {
144
149
container : fullLayout . _hoverlayer . node ( ) ,
@@ -171,7 +176,8 @@ module.exports = function plot(gd, calcData) {
171
176
} ;
172
177
173
178
var nodeHoverFollow = function ( element , d ) {
174
-
179
+ var trace = gd . _fullData [ d . traceId ] ;
180
+ var ptNumber = d . originalIndex ;
175
181
var nodeRect = d3 . select ( element ) . select ( '.nodeRect' ) ;
176
182
var boundingBox = nodeRect . node ( ) . getBoundingClientRect ( ) ;
177
183
var hoverCenterX0 = boundingBox . left - 2 ;
@@ -188,7 +194,11 @@ module.exports = function plot(gd, calcData) {
188
194
[ 'Incoming flow count:' , d . node . targetLinks . length ] . join ( ' ' ) ,
189
195
[ 'Outgoing flow count:' , d . node . sourceLinks . length ] . join ( ' ' )
190
196
] . filter ( renderableValuePresent ) . join ( '<br>' ) ,
191
- color : d . tinyColorHue ,
197
+ color : Fx . castHoverOption ( trace , ptNumber , 'bgcolor' ) || d . tinyColorHue ,
198
+ borderColor : Fx . castHoverOption ( trace , ptNumber , 'bordercolor' ) ,
199
+ fontFamily : Fx . castHoverOption ( trace , ptNumber , 'font.family' ) ,
200
+ fontSize : Fx . castHoverOption ( trace , ptNumber , 'font.size' ) ,
201
+ fontColor : Fx . castHoverOption ( trace , ptNumber , 'font.color' ) ,
192
202
idealAlign : 'left'
193
203
} , {
194
204
container : fullLayout . _hoverlayer . node ( ) ,
0 commit comments