} )();
- if ( !options.onStart || !( typeof options.onStart === 'function' ) ) {
+ if ( !options.onStart || typeof options.onStart !== 'function' ) {
throw 'Popcorn Code Plugin Error: onStart must be a function.';
}
- if ( options.onEnd && !( typeof options.onEnd === 'function' ) ) {
+ if ( options.onEnd && typeof options.onEnd !== 'function' ) {
throw 'Popcorn Code Plugin Error: onEnd must be a function.';
}
- if ( options.onFrame && !( typeof options.onFrame === 'function' ) ) {
+ if ( options.onFrame && typeof options.onFrame !== 'function' ) {
throw 'Popcorn Code Plugin Error: onFrame must be a function.';
}
}, 5);
} else {
// Create the feed control using the user entered url and title
- new GFdynamicFeedControl( options.url, newdiv, {
+ var tmp = new GFdynamicFeedControl( options.url, newdiv, {
vertical: options.orientation.toLowerCase() == "vertical" ? true : false,
horizontal: options.orientation.toLowerCase() == "horizontal" ? true : false,
title: options.title = options.title || "Blog"
// just a little tool function
// calculates the top and left position of an element
var offset = function(elem) {
- if(!elem) elem = this;
+ if ( !elem ) { elem = this; }
var x = elem.offsetLeft;
var y = elem.offsetTop;
- while (elem = elem.offsetParent) {
+ while ( elem === elem.offsetParent ) {
x += elem.offsetLeft;
y += elem.offsetTop;
}
return { left: x, top: y };
- }
+ };
Popcorn.plugin( "lowerthird" , {
}
else if( options.type == "SATELLITE" ) {
// add NASA WorldWind / LANDSAT map
- map = new OpenLayers.Map( { div: newdiv, "maxResolution": .28125, tileSize: new OpenLayers.Size( 512, 512 ) } );
+ map = new OpenLayers.Map( { div: newdiv, "maxResolution": 0.28125, tileSize: new OpenLayers.Size( 512, 512 ) } );
var worldwind = new OpenLayers.Layer.WorldWind( "LANDSAT", "http://worldwind25.arc.nasa.gov/tile/tile.aspx", 2.25, 4, { T: "105" } );
map.addLayer( worldwind );
displayProjection = new OpenLayers.Projection( "EPSG:4326" );
do {
left += obj.offsetLeft;
top += obj.offsetTop;
- } while (obj = obj.offsetParent);
+ } while (obj === obj.offsetParent);
}
return {
left : left,
},
_setup : function( options ) {
// make an iframe
- options._iframe = document.createElement( 'iframe' ),
+ options._iframe = document.createElement( 'iframe' );
options._iframe.setAttribute('width', "100%");
options._iframe.setAttribute('height', "100%");
options._iframe.id = options.id;