Skip to content

Commit

Permalink
plugins: fix cursor plugin destroy (katspaugh#1435)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bobrovskih authored and thijstriemstra committed Aug 22, 2018
1 parent ac84115 commit 926a995
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/plugin/cursor.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ export default class CursorPlugin {
* Initialise the plugin (used by the Plugin API)
*/
init() {
const wrapper = this.wavesurfer.container;
this.cursor = wrapper.appendChild(
this.wrapper = this.wavesurfer.container;
this.cursor = this.wrapper.appendChild(
this.style(
document.createElement('cursor'),
this.wavesurfer.util.extend(
Expand All @@ -136,10 +136,10 @@ export default class CursorPlugin {
)
);

wrapper.addEventListener('mousemove', this._onMousemove);
this.wrapper.addEventListener('mousemove', this._onMousemove);
if (this.params.hideOnBlur) {
wrapper.addEventListener('mouseenter', this._onMouseenter);
wrapper.addEventListener('mouseleave', this._onMouseleave);
this.wrapper.addEventListener('mouseenter', this._onMouseenter);
this.wrapper.addEventListener('mouseleave', this._onMouseleave);
}
}

Expand Down

0 comments on commit 926a995

Please sign in to comment.