@@ -114,26 +114,30 @@ fx.init = function(gd) {
114
114
// mousemove events for all data hover effects
115
115
var maindrag = dragBox ( gd , plotinfo , 0 , 0 ,
116
116
xa . _length , ya . _length , 'ns' , 'ew' ) ;
117
- $ ( maindrag )
118
- . mousemove ( function ( evt ) {
119
- fx . hover ( gd , evt , subplot ) ;
120
- fullLayout . _lasthover = maindrag ;
121
- fullLayout . _hoversubplot = subplot ;
122
- } )
123
- . mouseout ( function ( evt ) {
124
- /*
125
- * IMPORTANT:
126
- * We must check for the presence of the drag cover here.
127
- * If we don't, a 'mouseout' event is trigger on the
128
- * maindrag before each 'click' event, which has the effect
129
- * of cancelling the click event.
130
- */
131
- if ( fullLayout . _dragCover ) return ;
132
- fx . unhover ( gd , evt ) ;
133
- } )
134
- . click ( function ( evt ) {
135
- fx . click ( gd , evt ) ;
136
- } ) ;
117
+
118
+ maindrag . onmousemove = function ( evt ) {
119
+ fx . hover ( gd , evt , subplot ) ;
120
+ fullLayout . _lasthover = maindrag ;
121
+ fullLayout . _hoversubplot = subplot ;
122
+ } ;
123
+
124
+ /*
125
+ * IMPORTANT:
126
+ * We must check for the presence of the drag cover here.
127
+ * If we don't, a 'mouseout' event is trigger on the
128
+ * maindrag before each 'click' event, which has the effect
129
+ * of clearing the hoverdata; thus, cancelling the click event.
130
+ */
131
+ maindrag . onmouseout = function ( evt ) {
132
+ if ( gd . _dragging ) return ;
133
+
134
+ fx . unhover ( gd , evt ) ;
135
+ } ;
136
+
137
+ maindrag . onclick = function ( evt ) {
138
+ fx . click ( gd , evt ) ;
139
+ } ;
140
+
137
141
// corner draggers
138
142
dragBox ( gd , plotinfo , - DRAGGERSIZE , - DRAGGERSIZE ,
139
143
DRAGGERSIZE , DRAGGERSIZE , 'n' , 'w' ) ;
@@ -2070,7 +2074,6 @@ fx.dragElement = function(options) {
2070
2074
if ( options . prepFn ) options . prepFn ( e , startX , startY ) ;
2071
2075
2072
2076
dragCover = coverSlip ( ) ;
2073
- gd . _fullLayout . _dragCover = dragCover ;
2074
2077
2075
2078
dragCover . onmousemove = onMove ;
2076
2079
dragCover . onmouseup = onDone ;
@@ -2096,7 +2099,6 @@ fx.dragElement = function(options) {
2096
2099
dragCover . onmouseup = null ;
2097
2100
dragCover . onmouseout = null ;
2098
2101
Plotly . Lib . removeElement ( dragCover ) ;
2099
- delete gd . _fullLayout . _dragCover ;
2100
2102
2101
2103
if ( ! gd . _dragging ) {
2102
2104
gd . _dragged = false ;
0 commit comments