Closed arty-name closed 7 months ago
An alternative solution would be to pass in an arrow function, since they capture this
in closure:
change: Main.layoutManager.connect('monitors-changed', () => {
this.onMonitorChange();
}),
bind is good enough for now, whole code base could move towards better structuring and ES6 but here we are.
I have also noticed the error reported in #129 and figured out that the class method passed as a callback loses
this
reference, so it has to be bound