# FrameIndexCommand

## Content

# Class: FrameIndexCommand

Frame Index command.

## Implements

- [`UndoCommandSupport`](../interfaces/UndoCommandSupport)

## Constructors

### Constructor

```ts
new FrameIndexCommand(frameIndex, prevFrameIndex): FrameIndexCommand;
```

Constructor.

#### Parameters

##### frameIndex

`number`

##### prevFrameIndex

`number`

#### Returns

`FrameIndexCommand`

## Properties

### name

```ts
name: "FrameIndex";
```

Optional. The unique name of the command. Used by the undo.skipCommands option setting.

#### Implementation of

[`UndoCommandSupport`](../interfaces/UndoCommandSupport).[`name`](../interfaces/UndoCommandSupport#name)

## Methods

### execute()

```ts
execute(viewer): Promise<void>;
```

Action implementation.

#### Parameters

##### viewer

[`ImageViewerAPI`](../interfaces/ImageViewerAPI)

#### Returns

`Promise`&lt;`void`&gt;

#### Implementation of

[`UndoCommandSupport`](../interfaces/UndoCommandSupport).[`execute`](../interfaces/UndoCommandSupport#execute)

***

### undo()

```ts
undo(viewer): Promise<void>;
```

Undo action implementation.

#### Parameters

##### viewer

[`ImageViewerAPI`](../interfaces/ImageViewerAPI)

#### Returns

`Promise`&lt;`void`&gt;

#### Implementation of

[`UndoCommandSupport`](../interfaces/UndoCommandSupport).[`undo`](../interfaces/UndoCommandSupport#undo)
