# onSetPosition

```typescript
override onSetPosition(position: SquirrelPosition): void{
  super.onSetPosition(position);
}
```

Called when a setPosition event is received from Squirrel. The x and y coordinates of the component on the canvas is passed into this callback. If you need to get the position at any time you can call the [getPosition()](https://learn.squirrel365.io/squirrel-addon-documentation/squirrel-helper-library/angular/methods/getposition) method,

The event is fired when ever the component's position is changed on the canvas.  This could be when the component is manually moved, or when the x / y property is updated via a spreadsheet binding or property change.

If you super the base class onSetPosition method then it will add debug logs to your output

<br>

<br>
