Could you make this a function, like:
```
   onClick: function() {
       thisB.resize(...);
  }
```