summaryrefslogtreecommitdiff
path: root/firefoxos/sdremote/js/slideshow.js
diff options
context:
space:
mode:
authorAndrzej J.R. Hunt <andrzej@ahunt.org>2013-04-12 10:49:44 +0100
committerNorbert Thiebaud <nthiebaud@gmail.com>2014-01-30 17:17:30 -0600
commit20d513d2cfc8073642347efd9186d7d8ad98e711 (patch)
treedcf60064cf6145491d55eb5730cecb5be347a1b6 /firefoxos/sdremote/js/slideshow.js
parent9899693ae1485cc768955f86f7271ce2af59e48f (diff)
Image/Notes storage and basic preview.
Change-Id: I466b5e2232811af3fad2266c28e8c4475b77eb71
Diffstat (limited to 'firefoxos/sdremote/js/slideshow.js')
-rw-r--r--firefoxos/sdremote/js/slideshow.js33
1 files changed, 33 insertions, 0 deletions
diff --git a/firefoxos/sdremote/js/slideshow.js b/firefoxos/sdremote/js/slideshow.js
new file mode 100644
index 0000000..0940ab5
--- /dev/null
+++ b/firefoxos/sdremote/js/slideshow.js
@@ -0,0 +1,33 @@
+function Slideshow() {
+
+ var mSlides = 0;
+ var mCurrentSlide;
+
+ var mNotes = [];
+ var mPreviews = [];
+
+ this.setLength = function( aLength ) {
+ mSlides = aLength;
+ }
+
+ this.setCurrentSlide = function( aSlide ) {
+ mCurrentSlide = aSlide;
+ }
+
+ this.getCurrentSlide = function() {
+ return mCurrentSlide;
+ }
+
+ this.putPreview = function( aSlide, aImage ) {
+ mPreviews[ aSlide ] = aImage;
+ }
+
+ this.putNotes = function( aSlide, aNotes ) {
+ mNotes[ aSlide ] = aNotes;
+ }
+
+ this.getPreview = function( aSlide ) {
+ return mPreviews[ aSlide ];
+ }
+
+} \ No newline at end of file