Skip to content

Commit

Permalink
Move documentation into viewer folders
Browse files Browse the repository at this point in the history
- Move viewer documentation into their respective src folders
- Rename to README.md so they show up in Github
- Consolidate documentation for folders with multiple viewers
  • Loading branch information
Tony Jin committed Mar 22, 2017
1 parent 2d43af1 commit e78b591
Show file tree
Hide file tree
Showing 30 changed files with 302 additions and 293 deletions.
36 changes: 0 additions & 36 deletions docs/viewers/csv.md

This file was deleted.

49 changes: 0 additions & 49 deletions docs/viewers/dash.md

This file was deleted.

36 changes: 0 additions & 36 deletions docs/viewers/markdown.md

This file was deleted.

40 changes: 0 additions & 40 deletions docs/viewers/mp3.md

This file was deleted.

43 changes: 0 additions & 43 deletions docs/viewers/mp4.md

This file was deleted.

44 changes: 0 additions & 44 deletions docs/viewers/presentation.md

This file was deleted.

39 changes: 0 additions & 39 deletions docs/viewers/text.md

This file was deleted.

File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The 360 image viewer renders a preview of an image stored as an equirectangular

## Screenshot

![Screenshot of 360 image viewer](images/image360.png)
![Screenshot of 360 image viewer](../../../../../images/image360.png)

## Behavior

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The Model3D viewer renders previews of 3d model files and allows you to enable d

## Screenshot

![Screenshot of Model3D viewer](images/model3d.png)
![Screenshot of Model3D viewer](../../../../../images/model3d.png)

## Behavior

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The 360 video viewer renders a preview of a video stored as an equirectangular p

## Screenshot

<img src=./images/video360.png />
![Screenshot of 360 video viewer](../../../../../images/video360.png)

## Behavior

Expand Down
47 changes: 46 additions & 1 deletion docs/viewers/document.md → src/lib/viewers/doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The document viewer renders previews for a variety of document types.

## Screenshot

![Screenshot of document viewer](images/document.png)
![Screenshot of document viewer](../../../../images/document.png)

## Behavior

Expand Down Expand Up @@ -45,3 +45,48 @@ The document viewer fires the following events
| scrollend | The viewer stops scrolling | 1. {number} **scrollTop**: number of pixels scrolled from top of viewport 2. {number} **scrollLeft**: number of pixels scrolled from left of viewport |
| printsuccess | An attempt to print triggered successfully ||
| printsuccess | An attempt to print failed ||


# Presentation Viewer

The presentation viewer renders previews of powerpoint files.

## Screenshot
![Screenshot of presentation viewer](../../../../images/presentation.png)

## Behavior

The presentation viewer remembers which slide you were viewing upon closing the preview. The next time that file is opened, you will immediately be brought to that page. Scrolling the mouse up and down, or swiping up and down on mobile will transition between slides. Zooming in or out will increase or decrease the size of the slide respectively. If the zoom level causes the content to overflow, scrolling the mouse will allow you to scroll around the slide. To return to normal scrolling behavior, the user must zoom out until the overflow is removed.

### Controls:
* Zoom In
* Zoom Out
* Set Page: either with the up and down arrows, or by clicking the page number and entering text
* Fullscreen: can be exited with the escape key

## Supported File Extensions

`ppt, pptx, odp`

## Options

| Option | Type | Description |
| --- | --- | --- |
| annotations | boolean | Optional. Whether annotations on content are shown. Defaults to false |

## Events
The presentation viewer fires the following events

| Event Name | Explanation | Event Data |
| --- | --- | --- |
| destroy | The preview is intentionally destroyed ||
| load | The preview loads | 1. {string} **error** (optional): error message 2. {object} **file**: current file 3. {object} **metrics**: information from the logger 4. {object} **viewer**: current viewer |
| notification | A notification is displayed ||
| navigate | The preview is shown for a given index | {object} file |
| reload | The preview reloads ||
| resize | The preview resizes | 1. {number} **height**: window height 2. {number} **width**: window width |
| zoom | The preview zooms in or out | 1. {number} **zoom**: new zoom value 2. {boolean} **canZoomIn**: true if the viewer can zoom in more 3. {boolean} **canZoomOut**: true if the viewer can zoom out more |
| pagerendered | A page renders | {number} page number of rendered page |
| pagefocus | A page is visible | {number} page number of focused page |
| scrollstart | The viewer starts to scroll | 1. {number} **scrollTop**: number of pixels scrolled from top of viewport 2. {number} **scrollLeft**: number of pixels scrolled from left of viewport |
| scrollend | The viewer stops scrolling | 1. {number} **scrollTop**: number of pixels scrolled from top of viewport 2. {number} **scrollLeft**: number of pixels scrolled from left of viewport |
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/viewers/image.md → src/lib/viewers/image/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The image viewer renders previews of image files.

## Screenshot
![Screenshot of image viewer](images/image.png)
![Screenshot of image viewer](../../../../images/image.png)

## Behavior
Rotating the viewer will rotate the image 90 degrees clockwise. At the default zoom level, clicking on the image will zoom in once. When zoomed in, clicking on the document will return to the default zoom level. When zoomed out, clicking on the document will zoom in until the original zoom level is reached.
Expand Down
Loading

0 comments on commit e78b591

Please sign in to comment.