# StopAnimationCommand

## Content

# Class: StopAnimationCommand

StopAnimation command.

## Implements

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

## Constructors

### Constructor

```ts
new StopAnimationCommand(stopFrameIndex, startFrameIndex): StopAnimationCommand;
```

Constructor.

#### Parameters

##### stopFrameIndex

`number`

##### startFrameIndex

`number`

#### Returns

`StopAnimationCommand`

## Properties

### name

```ts
name: "StopAnimation";
```

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)
