Skip to content

Conversation

@viskosa
Copy link
Collaborator

@viskosa viskosa commented Aug 2, 2018

I can't to remove eventListener at the last task(( And it works in a strange way


handlerMouseUp(){
console.log('щас сниму');
window.removeEventListener('mousemove', this.handlerMouseMove);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

да тут не получилось потому что

this.handlerMouseDown.bind(this) != this.handlerMouseMove

Если нужно прибиндить событие куда то, то в конструкторе так и пишут
this.handlerMouseMove = this.handlerMouseDown.bind(this)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants