File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ module.exports.Component = registerComponent('cursor', {
133
133
// Ignore the cursor.
134
134
if ( cursorEl === intersectedEl ) { return ; }
135
135
136
- // ignore if the event didn't occur on the current intersection
136
+ // Ignore if the event didn't occur on the current intersection.
137
137
if ( intersectedEl !== this . intersectedEl ) { return ; }
138
138
139
139
this . clearCurrentIntersection ( intersectedEl ) ;
@@ -160,11 +160,11 @@ module.exports.Component = registerComponent('cursor', {
160
160
* Helper to emit on both the cursor and the intersected entity (if exists).
161
161
*/
162
162
twoWayEmit : function ( evtName ) {
163
+ var el = this . el ;
163
164
var intersectedEl = this . intersectedEl ;
164
- var cursorEvtDetail = { intersectedEl : this . intersectedEl , intersection : this . intersection } ;
165
- var intersectedElEvtDetail = { cursorEl : this . el , intersection : this . intersection } ;
166
- this . el . emit ( evtName , cursorEvtDetail ) ;
165
+ var intersection = this . intersection ;
166
+ el . emit ( evtName , { intersectedEl : intersectedEl , intersection : intersection } ) ;
167
167
if ( ! intersectedEl ) { return ; }
168
- intersectedEl . emit ( evtName , intersectedElEvtDetail ) ;
168
+ intersectedEl . emit ( evtName , { cursorEl : el , intersection : intersection } ) ;
169
169
}
170
170
} ) ;
You can’t perform that action at this time.
0 commit comments