Skip to content

Commit

Permalink
Fix: Create new schema JSON files (fixes #11)
Browse files Browse the repository at this point in the history
  • Loading branch information
joe-allen-89 authored Feb 15, 2023
1 parent fd2fdd0 commit 9276505
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The attributes listed below are used in *course.json* to configure **Adapt Graph
>**\_onPauseRewind** (Boolean): Rewind when the pause button is clicked. Defaults to `false`.
----------------------------
**Version number:** 0.1.1<br/>

**Framework versions:** >=5.14<br/>
**Author / maintainer:** Kineo<br/>
**Accessibility support:** Yes<br/>
Expand Down
82 changes: 82 additions & 0 deletions schema/course.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"$anchor": "graphicLottie-course",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"$patch": {
"source": {
"$ref": "course"
},
"with": {
"properties": {
"_graphicLottie": {
"type": "object",
"title": "Graphic Lottie Animation",
"default": {},
"properties": {
"_isEnabled": {
"type": "boolean",
"title": "Is Enabled",
"description": "If enabled, graphics with the file extension below will be replaced by animations.",
"default": true
},
"_fileExtension": {
"type": "string",
"title": "File extension",
"description": "Replace files with this extension only.",
"default": "svgz",
"enum": [
"bmp",
"svgz"
],
"_backboneForms": "Select"
},
"_loops": {
"type": "number",
"title": "Number of animation loops",
"description": "Note: -1 for infinite loops, 0 for play once, 1 for play twice...",
"default": -1
},
"_autoPlay": {
"type": "boolean",
"title": "Autoplay animations?",
"description": "Note: Percentage onscreen determines when autoplay occurs.",
"default": true
},
"_onScreenPercentInviewVertical": {
"type": "number",
"title": "Percentage on-screen",
"description": "At least this much must in view before autoplaying. Less than is considered off-screen",
"default": 1
},
"_playFirstViewOnly": {
"type": "boolean",
"title": "Only play animation when first inview?",
"description": "Note: Percentage onscreen determines when inview.",
"default": true
},
"_offScreenPause": {
"type": "boolean",
"title": "Pause when off-screen?",
"default": true
},
"_offScreenRewind": {
"type": "boolean",
"title": "Rewind when off-screen?",
"default": true
},
"_showPauseControl": {
"type": "boolean",
"title": "Show play/pause button?",
"default": true
},
"_onPauseRewind": {
"type": "boolean",
"title": "Rewind when paused?",
"default": false
}
}
}
}
}
}
}

0 comments on commit 9276505

Please sign in to comment.