# plugins.finalcutpro.timeline.zoomtoselection

Zoom the Timeline to fit the currently-selected clips.

---

## API Overview
**Methods** - _API calls which can only be made on an object returned by a constructor_
 * [toggleZoomToFit](#togglezoomtofit)
 * [toggleZoomToSelection](#togglezoomtoselection)
 * [zoomToSelection](#zoomtoselection)

---

## API Documentation

#### Methods

### [toggleZoomToFit](#togglezoomtofit)

|                                             |                                                                                     |
| --------------------------------------------|-------------------------------------------------------------------------------------|
| **Signature**                               | `plugins.finalcutpro.timeline.zoomtoselection.toggleZoomToFit() -> none`                                                                    |
| **Type**                                    | Method                                                                     |
| **Description**                             | Toggles between "Zoom to Selection" and the last zoom amount.                                                                     |
| **Parameters**                              | <ul><li>None</li></ul> |
| **Returns**                                 | <ul><li>None</li></ul>          |
| **Notes**                                   | None |
| **Examples**                                | None |
| **Source**                                  | [src/plugins/finalcutpro/timeline/zoomtoselection.lua line 183](https://github.com/CommandPost/CommandPost/blob/develop/src/plugins/finalcutpro/timeline/zoomtoselection.lua#L183) |

---

### [toggleZoomToSelection](#togglezoomtoselection)

|                                             |                                                                                     |
| --------------------------------------------|-------------------------------------------------------------------------------------|
| **Signature**                               | `plugins.finalcutpro.timeline.zoomtoselection.toggleZoomToSelection() -> none`                                                                    |
| **Type**                                    | Method                                                                     |
| **Description**                             | Toggles between "Zoom to Selection" and the last zoom amount.                                                                     |
| **Parameters**                              | <ul><li>None</li></ul> |
| **Returns**                                 | <ul><li>None</li></ul>          |
| **Notes**                                   | None |
| **Examples**                                | None |
| **Source**                                  | [src/plugins/finalcutpro/timeline/zoomtoselection.lua line 154](https://github.com/CommandPost/CommandPost/blob/develop/src/plugins/finalcutpro/timeline/zoomtoselection.lua#L154) |

---

### [zoomToSelection](#zoomtoselection)

|                                             |                                                                                     |
| --------------------------------------------|-------------------------------------------------------------------------------------|
| **Signature**                               | `plugins.finalcutpro.timeline.zoomtoselection.zoomToSelection() -> boolean`                                                                    |
| **Type**                                    | Method                                                                     |
| **Description**                             | Zooms the view to fit the currently-selected clips.                                                                     |
| **Parameters**                              | <ul><li>None</li></ul> |
| **Returns**                                 | <ul><li>`true` if there is selected content in the timeline and zooming was successful.</li></ul>          |
| **Notes**                                   | None |
| **Examples**                                | None |
| **Source**                                  | [src/plugins/finalcutpro/timeline/zoomtoselection.lua line 101](https://github.com/CommandPost/CommandPost/blob/develop/src/plugins/finalcutpro/timeline/zoomtoselection.lua#L101) |

---

---

<script src="https://giscus.app/client.js"
        data-repo="CommandPost/CommandPost"
        data-repo-id="MDEwOlJlcG9zaXRvcnk3NDY0NTk2NQ=="
        data-category="Website Discussion"
        data-category-id="DIC_kwDOBHMBzc4CXFFA"
        data-mapping="pathname"
        data-strict="0"
        data-reactions-enabled="1"
        data-emit-metadata="0"
        data-input-position="bottom"
        data-theme="dark"
        data-lang="en"
        crossorigin="anonymous"
        async>
</script>
