Have a problem making ReactiveDict firing the Tracker.autorun
export class myTest {
constructor() {
this.mapInstance; << googleMapsObject;
this.state = new ReactiveDict();
Tracker.autorun(() => {
Meteor.subscribe('xxx', this.state.get('mapBox')); <<never called
});
}
//code edited to reflect the problem - otherMethod() removed
this.mapInstance.instance.addListener('dragend', () => {
this.state.set('mapbox', this.getBox());
});
getBox ()
{
return ['geoJason box like region definition array here'];
}
}
I know it’s something about binding.this … but can some explain more the ‘bind it’ ??