Skip to content

Commit

Permalink
Fix not properly unbound event-listener in _onTapStop
Browse files Browse the repository at this point in the history
Add info about initialization to README
  • Loading branch information
simonwep committed Jan 2, 2021
1 parent 013830b commit e2134ed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ selection.on('beforestart', evt => {
});
```

> The initialization is **always** synchronous, therefore there is no `init` event and any initilization-related work can be done immediately after creation.
### Event data
Each `evt` object will yield the following data:

Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ export default class SelectionArea extends EventTarget {
this._scrollSpeed = {x: 0, y: 0};

// Unbind mouse scrolling listener
off(window, 'wheel', this._manualScroll);
off(document, 'wheel', this._manualScroll, {passive: true});

// Remove selection-area from dom
this._clippingElement.remove();
Expand Down

0 comments on commit e2134ed

Please sign in to comment.