]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
[#246] fixed google maps to check that zoom is a number, and lowercased plugin unit...
authorScottDowne <sdowne@learn.senecac.on.ca>
Mon, 10 Jan 2011 21:54:16 +0000 (16:54 -0500)
committerScottDowne <sdowne@learn.senecac.on.ca>
Mon, 10 Jan 2011 21:54:16 +0000 (16:54 -0500)
plugins/googleMap/popcorn.googleMap.html
plugins/googleMap/popcorn.googleMap.js
plugins/googleMap/popcorn.googleMap.unit.js
plugins/tagThisPerson/popcorn.tagThisPerson.unit.html
plugins/tagThisPerson/popcorn.tagThisPerson.unit.js

index 9a216f1766a497208a61362fe7c2929d7085a527..00e763fec2d5e522fb46f33ec79c508209cdd9db 100644 (file)
@@ -17,7 +17,7 @@
         target: 'map',
         lat: 43.665429,
         long: -79.403323,
-        zoom: 10
+        zoom: "10"
       } )
       .googlemap({
         start: 0, // seconds
index 073bea439f318c3a142737575300f3a4ea2e8f3c..8e7e63533194df3fc9f8cd02a6486c127f86e751 100644 (file)
@@ -124,7 +124,14 @@ var googleCallback;
             }
             // reset the location and zoom just in case the user plaid with the map
             options._map.setCenter(location);
-            options._map.setZoom(options.zoom || 0);
+            if ( options.zoom ) {
+              if ( typeof options.zoom !== "Number" ) {
+                options.zoom = +options.zoom;
+              } 
+            } else {
+              options.zoom = 0;
+            }
+            options._map.setZoom( options.zoom );
           }
         };
         
index 172c26ed6373de6b1fceecfa831bdeadb462307d..b5cd31fa7a75a18152a7d9675187c10f40282a74 100644 (file)
@@ -18,7 +18,7 @@ test("Popcorn Google Map Plugin", function () {
   
   stop();
    
-  ok ('googleMap' in popped, "googleMap is a mehtod of the popped instance");
+  ok ('googlemap' in popped, "googlemap is a mehtod of the popped instance");
   plus();
   
   ok ( document.getElementById('map').innerHTML === "", "initially, there is nothing inside the map" );
@@ -27,7 +27,7 @@ test("Popcorn Google Map Plugin", function () {
   ok ( document.getElementById('map2').innerHTML === "", "initially, there is nothing inside the map2" );
   plus();
   
-  popped.googleMap({
+  popped.googlemap({
         start: 0, // seconds
         end: 5, // seconds
         type: 'ROADMAP',
@@ -36,7 +36,7 @@ test("Popcorn Google Map Plugin", function () {
         long: -79.403323,
         zoom: 10
       } )
-      .googleMap({
+      .googlemap({
         start: 0, // seconds
         end: 5, // seconds
         type: 'SATELLITE',
index 43e90b75ef09f41dc46bce59cb30b507d6cbc91e..a4ebef5519d283a9069a443ec29c4815c4b433ab 100644 (file)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
 <head>
-  <title>Popcorn tagThisPerson test</title>
+  <title>Popcorn tagthisperson test</title>
   <link rel="stylesheet" href="../../test/qunit/qunit.css" type="text/css" media="screen">
   <script src="../../test/qunit/qunit.js"></script>
   <!-- 
@@ -15,7 +15,7 @@
   <script src="popcorn.tagThisPerson.unit.js"></script>
 </head>
 <body>
-  <h1 id="qunit-header">Popcorn tagThisPerson Plugin</h1>
+  <h1 id="qunit-header">Popcorn tagthisperson Plugin</h1>
   <h2 id="qunit-banner"></h2>
   <div id="qunit-testrunner-toolbar"></div>
   <h2 id="qunit-userAgent"></h2>
index fc6ae2ccd74b8879f7e4e87dac2a6aaffb743a8d..6c3894a2a54e2f45b4384f8de726672d01e9577e 100644 (file)
@@ -1,4 +1,4 @@
-test("Popcorn tagThisPerson Plugin", function () {
+test("Popcorn tagthisperson Plugin", function () {
   
   var popped = Popcorn("#video"),
       expects = 6, 
@@ -18,19 +18,19 @@ test("Popcorn tagThisPerson Plugin", function () {
   
   stop();
    
-  ok ('tagThisPerson' in popped, "tagThisPerson is a method of the popped instance");
+  ok ('tagthisperson' in popped, "tagthisperson is a method of the popped instance");
   plus();
   
   equals ( tagdiv.innerHTML, "", "initially, there is nothing inside the tagdiv" );
   plus();
   
-  popped.tagThisPerson({
+  popped.tagthisperson({
       start: 0, // seconds
       end: 5, // seconds
       person: 'Anna Sob',
       target: 'tagdiv'
     } )
-    .tagThisPerson({
+    .tagthisperson({
       start: 3, // seconds
       end: 10, // seconds
       person: 'Scott',