instead of creating a new "directionDefault" variable, I believe you should always check for 
```js
this.model.options.direction == tart.ui.TooltipComponentModel.Direction.TOPLEFT
```
e.g. for lines 233 and 239. (actually the check at line 239 should be included in the check at line 238.)