> ## Documentation Index
> Fetch the complete documentation index at: https://docs.supernote.com/llms.txt
> Use this file to discover all available pages before exploring further.

# flipLassoElements

> Flip the elements in the current lasso selection in place.

<Note>
  You must create a lasso selection before calling this API; otherwise the call fails.
</Note>

```ts theme={null}
static flipLassoElements(flipType: number): Promise<APIResponse<boolean>>;
```

**Parameters**

| Parameter  | Type     | Description                                                                                       |
| ---------- | -------- | ------------------------------------------------------------------------------------------------- |
| `flipType` | `number` | Flip type. Only `1` and `2` are supported. `1` means horizontal flip, and `2` means vertical flip |

**Notes**

* This API flips the elements in the current lasso selection in place
* Only horizontal and vertical flipping are currently supported

**Returns**

* [`APIResponse<boolean>`](/en/api-reference/supernote-plugin/types/api-response):
  `result === true` indicates the in-place flip operation succeeded

## Example

```ts wrap theme={null}
import { PluginCommAPI } from 'sn-plugin-lib';

/**
 * Flip the elements in the current lasso selection in place.
 */
export async function exampleFlipLassoElements(flipType: 1 | 2) {
  console.log('flipLassoElements flipType:', flipType);
  const res = await PluginCommAPI.flipLassoElements(flipType);
  if (!res.success) {
    throw new Error(res.error?.message ?? 'flipLassoElements call failed');
  }
  console.log('flipLassoElements result:', res.result);
  return res.result;
}
```
