mirror of
https://github.com/edward-shen/MMM-pages.git
synced 2024-11-22 02:04:29 -08:00
added documentation
typo fixes
This commit is contained in:
parent
0c33e2f09d
commit
92c4be1973
2 changed files with 21 additions and 17 deletions
|
@ -85,8 +85,8 @@ Module.register('MMM-pages', {
|
||||||
this.updatePages(true);
|
this.updatePages(true);
|
||||||
this.sendNotification('MAX_PAGES_CHANGED', this.config.modules.length);
|
this.sendNotification('MAX_PAGES_CHANGED', this.config.modules.length);
|
||||||
break;
|
break;
|
||||||
case 'REQUEST_CURRENT_PAGE':
|
case 'QUERY_PAGE_NUMBER':
|
||||||
this.sendNotification('CURRENT_PAGE_IS', this.curPage);
|
this.sendNotification('PAGE_NUMBER_IS', this.curPage);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
|
|
20
readme.md
20
readme.md
|
@ -50,13 +50,13 @@ modules: [
|
||||||
|
|
||||||
## Configuration options
|
## Configuration options
|
||||||
|
|
||||||
Option |Type |Default Value |Description
|
| Option | Type | Default Value | Description |
|
||||||
---------------|------------------|------------------------|-----------
|
| --------------- | ------------------ | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
`modules` |`[[String...]...]`|`[]` |A 2D String array of what each module should be on which page. Notethat all entries must take their class name (e.g. this module's class name is `MMM-pages`, while the default modules may just have `newsfeed`, without the `MMM-` prefix.
|
| `modules` | `[[String...]...]` | `[]` | A 2D String array of what each module should be on which page. Notethat all entries must take their class name (e.g. this module's class name is `MMM-pages`, while the default modules may just have `newsfeed`, without the `MMM-` prefix. |
|
||||||
`excludes` |`[String...]` |`["MMM-page-indicator"]`|Which modules should show up all the time.
|
| `excludes` | `[String...]` | `["MMM-page-indicator"]` | Which modules should show up all the time. |
|
||||||
`animationTime`|`int` |`1000` |Fading animation time. Set to `0` for instant change. Value is in milliseconds (1 second = 1000 milliseconds).
|
| `animationTime` | `int` | `1000` | Fading animation time. Set to `0` for instant change. Value is in milliseconds (1 second = 1000 milliseconds). |
|
||||||
`rotationTime` |`int` |`0` |Time, in milliseconds, between automatic page changes.
|
| `rotationTime` | `int` | `0` | Time, in milliseconds, between automatic page changes. |
|
||||||
`delayTime` |`int` |`0` |Time, in milliseconds, of how long should a manual page change linger before returning to automatic page changing. In other words, how long should the timer wait for after you manually change a page. This does include the animation time, so you may wish to increase it by a few seconds or so to account for the animation time.
|
| `delayTime` | `int` | `0` | Time, in milliseconds, of how long should a manual page change linger before returning to automatic page changing. In other words, how long should the timer wait for after you manually change a page. This does include the animation time, so you may wish to increase it by a few seconds or so to account for the animation time. |
|
||||||
|
|
||||||
For the `module` configuration option, the first element of the outer array
|
For the `module` configuration option, the first element of the outer array
|
||||||
should consist of elements that should be on the first page. The second element
|
should consist of elements that should be on the first page. The second element
|
||||||
|
@ -87,9 +87,13 @@ have. If there arises a need, please create an issue.
|
||||||
This module sends one notification, `MAX_PAGES_CHANGED` to assist display
|
This module sends one notification, `MAX_PAGES_CHANGED` to assist display
|
||||||
modules with how many pages they should display. However, this module does not
|
modules with how many pages they should display. However, this module does not
|
||||||
enforce what page other modules should indicate. This is intentional, because
|
enforce what page other modules should indicate. This is intentional, because
|
||||||
any other module that needs a page change notification should be recieving from
|
any other module that needs a page change notification should be receiving from
|
||||||
the notification system.
|
the notification system.
|
||||||
|
|
||||||
|
Finally, if you want to know what page you're currently on, send a `QUERY_PAGE_NUMBER`
|
||||||
|
notification. The module will respond with a `PAGE_NUMBER_IS` notification,
|
||||||
|
with the payload of the current page number.
|
||||||
|
|
||||||
## FAQ
|
## FAQ
|
||||||
|
|
||||||
- Help! My module is (above/below) another module in the same region but I want
|
- Help! My module is (above/below) another module in the same region but I want
|
||||||
|
|
Loading…
Reference in a new issue