Earthengine pull request 2014-06-05

Contains 205 squashed commits from master, from be89b4ebd86538e8ed87ab3c2a650b2a08bc4b26 to beb70234604f2e65718b2eb55d5679cfb5c652e9, to make reviewing the pull request easier.

- Tour share link now works with all datasets.

- cleaned up intergrated-viewer.html
- added support to fit viewer to browser window (full screen support coming soon)
- merged hyperwall code
- merged joystick code
- file formatting changes
- fixed UI race condition when stopping/replaying tours

Hyperwall controller elements now has latlng center view data.

- Fixed regression when doing an instant warp between keyframes.

- Fixed issue if viewerGeometry param is not specified in the viewer options when creating a time machine.
- integrated-viewer.html is now a bare bones example, as it was in the past. Needed for TMCA. Further html examples/file cleanup forthcoming.
- Tweaked fix from previous commit for instant warps between keframes in tours.

- Tweaked default params in the viewer options for integrated-viewer.html

Pulled in hyperwall change.

Added old code as comments for future debugging.

Hyperwall related changes. Server can change the play button UI on the controller.

Tweaked the zooming and panning for hyperwall controller.
Fixed a bug that caused zoomGracefully to not zoom to the correct level.
File formatting changes to crossdomain_api.js

Fixed a bug that zoomGracefully() will not zoom to the final level if there exists 0.5 difference.
Fixed a bug in controller.html for sorting keyframes due to the update from Android 4.3 to 4.4

Disable thumbnail sorting in hyperwall controller due to Android version issues.

- Hyperwall related changes for play/pause button UI.

Changed thumbnails for hyperwall controller.

Synced hyperwall code. Fixed the timer for the zooming gracefully function.

- Fixed mouseup issues while dragging a time lapse and the mouse goes outside the browser window or outside an iframe.

- Removed console messages from previous commit.

- Cleanup to previous mouse handling commits.

- Fixed issue where the zoom slider would get stuck (mouseup never fires) when the user's mouse leaves the viewport that is inside an iframe.

- Synced with hyperwall code.

- Synced with hyperwall branch.

Added MODIS UI.
Added presentation mode.
Added the ability to rearrange keyframes while creating a tour.
Misc bug fixes.
Added new example files.

Fixed the bug that the speed toggling button does not change correclty if the speed is set to less than 100%.

The spinner values for MODIS UI are now consistent.
Fixed a bug in timelapse.js that skipping frames at the end does not correctly remove the captured times.

Fixed some MODIS editor UI bugs.
Redesign the default UI.

Fixed a month lock related bug in MODIS UI.

- Removed old, unused kineticjs library file.
- Minor cleanup.

- Added a public method for generating a link to a thumbnail of the current view.

- Updated how templates/json are loaded so that we can mix and match ajax loading and loading via javascript includes.
- Updated the template javascript include file.

- Updated jQuery to 1.11.0 and jQuery UI to 1.10.4

- Removed unnecessary console messages from previous commit.

- You can dynamically change datasets without the need to reload the entire page.
- Some code cleanup.

Cleaned up the code for visualizer (the context map).
Fixed the loading bug for visualizer.
Minor default UI tweaks.
Fixed a bug for the home view when initially loading a dataset.

Updated template_includes.js

Fixed minor editor UI bugs.

Redesign the UI for toggling between different editor modes.

Redesign the button for toggling between modes for custom UI.

Added the function and UI for adding keyframe titles (different from captions).

Fixed minor bugs for loading keyframe titles.

Added a textbox showing up when hovering mouse cursors over thumbnails in the presentation slider.

Added focusing effect on thumbnails in presentation mode.
Instruction layout for custom UI editor is now correct.
Added several testing html files.

Repositioned the hovering box so that it will not be cropped in an iframe.

Fixed minor bugs.

Cleaned up HTML files.
Tweaked UI for MODIS tour editor.

Fixed the UI bugs for MODIS tour editor.

Fixed minor bugs related to settings.

- Fixed an issue if datasets did not have a trailing slash and were loaded dynamically from loadTimelapse().

Removed the tooltip for the timeline slider on default UI.

The viewer mode toggling button would not show up if the editor is not enabled.

Removed useless settings.
Cleaned up HTML examples.
Removed useless files.
Fixed bugs related to settings.

Added a setting for hiding the logo on default UI.

Updated template_includes.js

Updated how logos are loaded.

Fixed a bug for the presentation slider.
Tweaked the default UI.

Separated the tour and presentation slider object.
Fixed minor resizing issues.

Added a function for loading a presentation slider using JavaScript.

Fixed a bug that keyframe titles will appear even when disabled.
Fixed a bug that loop times in the last keyframe is sometimes wrong after rearranging it.

The last keyframe will always be reset after completing the loading process.

Fixed IE bug related to text selection with the tour saving dialog.

Fixed a hyperwall related bug.

Synced to hyperwall code.

Tweaked the UI for video quality selector.
The button for playing and stopping a tour is now more obvious.
The opacity of the keyframe container is changed when a tour is playing.

Tweaked the default UI.

Tweaked the UI of the button for playing and stopping a tour.
Added a setting for showing the editor on default UI after loading.

Deleted some useless html files.
Added some html pages for testing.

Updated the viewer animation test html file.

Synced to hyperwall code.

Synced to hyperwall code.

The presentation slider now starts from the home view.
The shared view from hash now works again on presentation view-only mode.

Clicking on the last icon on the left or right animates a scroll.

The presentation mode now starts from the first keyframe if there is no shared view from hash.

Added 0.5 sec loop dwell time to the playback of month lock for MODIS.
Fixed a bug that clicking help does not stop the playback of month lock.

The locking state of MODIS can now be shared as hash.
Fixed a date text bug in Landsat UI on Firefox.
Fixed a hovering effect bug in the presentation slider on IE 10.

Fixed date text UI bugs when playing a tour.

Fixed a bug that users cannot select the text in the textbox in the transition table in IE.

- Fixed an issue where the timeline would not update accordingly when you dynamically load a new timelapse.

Tweaked the behavior of scrolling animation when clicking the last thumbnails on the right or left.

Redesigned the graphical effect for the selected thumbnail and the hovering box.

Changed the position of delete button on the editor.
Updated MODIS demo files.

Synced to hyperwall code.

Updated html demo files.

Synced to hyperwall code.

- Fixed issues related to the timeline slider after dynamically changing a dataset.

Fixed a bug that the mode toggling button on default UI is sometimes broken.

Synced to hyperwall code.

- Code cleanup.

Fixed regression with playback when pressing help button.
Fixed iframe mouse leaving bug for the help overlay on MODIS UI.
Changed the help overlay box to white background and black text.

Tweaked the hovering textbox for thumbnail slider.

IE 11 has changed its user agent which prevented all our IE checks from running. Fixed isIE() check to account for this.

Player UI is now only displayed once all sizes and css are correctly set. This prevents the initial 'broken UI' look on page load.

Changed the background of the title bar on the top of the dialog box.

Added a funtion for going to a location on the slider from shared hash.
Added an event listener to detect when a location on the slider is selected.

- Some cleanup to browser detection code.
- Modifications to Opera detection.

- Refactored coordinate system functions.

- Added another error check when setting the size of the viewport.

- First stage of adding parabolic motion for view changes.

- Parabolic motion is now used when changing a view. Looks very smooth.

- More cleanup.

- Refactored all example html files.
- Fixed path for images and hand cursors so that they work no matter the location of the index page.
- Other misc cleanup.

- Cleanup of unused files.

- Removed unnecessary script includes from example html files.

- More cleanup and proper includes for cross domain communication.

Create README.md

Update README.md

- Tweaked default viewer html file.
- Fix for regression with cursor paths.
- Fix for useThumbnailServer option being set incorrectly.

Fixed a bug for the visualizer geometry.

- Cleanup of old files.

Moved hyperwall related html files to the hyperwall repository.

Tweaked animation related parameters.

Removed hyperwall related js files.
Tweaked the path speed for parabolic motions.

- Removed more unused files.
- Fixed some file formatting.
- Minified some jquery libraries.

Hyperwall related changes.

Update README.md

Update README.md

Tweaked the animation for hyperwall.

Added a function for going to a location on the slider in cross domain api.

Canceled the parabolic motion on mousedown inside the viewer.

Fixed a bug that the presentation slider is sometimes positioned incorrectly.
Improved the testing html page for viewer animation settings.

The presentation slider will not go to a location initially if there is a shared tour.
Fixed a UI problem related to hyperwall.

Added new html test pages.
Fixed a UI bug related to the context map.
Added a media type flag in the function for generating a thumbnail url.

Added Google Analytics event tracking, which can be enabled from settings.
Removed useless code.

- Fix for how we compute the root URL.

Refactored the math code for camera motion control in the editor.
Fixed a bug that sometimes the duration between two keyframes does not consider loop dwell time.

Added a html test page for Time Machine wiki website.

Added a html test page for Time Machine wiki webpage.

Changed onTimeMachineReady to a viewer setting.

Changed the speed control for default UI.

Updated the instruction overlay for default UI.

- When calling loadTimelapse(), we can now load a new timelapse at specific view/time or load based on the same view/time of the
previously displayed dataset.

- Added default return param of onTimeMachinePlayerReady() to the example/test html files.

Fixed regression from last commit with how hashes are loaded (tours, presentations, etc)

Replaced enableCustomUI setting with datasetType.

Added Time Machine wiki website support.
Redesigned the scrollbar on the editor.
The editor scrollbar now always shows up for OS X trackpad users in WebKit.

Hided the video quality bar when in presentation view only mode.

Updated view.html

- Further improvements for computing the root URL. Should be more robust.

- Various security related changes and code cleanup based on the discussion here: https://github.com/CMU-CREATE-Lab/timemachine-viewer/pull/1#issuecomment-40639702
- Added test page for testing cross-domain functionality.

Refactored UI.
Removed duplicated editor code from viewer UI classes and moved them to snaplapseViewer.js
Moved UI code from snaplapse.js to snaplapseViewer.js
Added a new snaplapse object to load tours to the viewer but not editor.
Added a function for loading shared data in cross domain API.

Updated template_includes.js

Removed wiki related code.
Added a function for switching layers in cross domain API.

Time Machine website related changes.

Fixed a bug that the subtitle is sometimes in the wrong position.
Removed useless code in timelapse.js

Tweaked the css for buttons on default UI.

Tweaked the css of buttons on default UI.

Added a flag to disable the ability for adding keyframe titles.

- If the user is watching a tour and then clicks a share link (that uses the cross domain api) stop and clear out the tour before changing to the new
view.

- Added a new workaround for the Chrome cache bug (https://code.google.com/p/chromium/issues/detail?id=31014)

- Disabled the visualizer context map used by the editor when the defaultUI is utilized. See the comment in the code for details regarding bizarre
behavior in Chrome that rears its head under low/flaky bandwidth connections.

Changed the min and max size of the viewer.

Tweaked the search box UI.

Fixed a viewer resizing bug when switching between layers.

When playing a tour, always show captured time when using default UI.
Tweaked the position and animation of the tour loading overlay.

Added a new embed page for the Time Machine website.
Added the presentation slider height to the embeding window height.
Tweaked the position of the tour overlay title.

Tweaked the UI for the capture time when playing a tour.

- Updated jQuery to 1.11.1

Removed the captured time UI when using custom UI.

Updated the logo on default UI.

Refactored the autoscrolling logic.

Hide the logo on the default UI on time machine website.

Added a possible source URL for time machine website.

Fixed a bug in switching between layers in cross domain API.

Refactored the logic for loading the tour playback overlay.

Fixed viewer_animation_test.html

- Moved templates to their own directory.
- Added comments inside ruby scripts.
- Minor cleanup.

Refactored a small part of default UI class.

Added a flag to enable the context map on default UI.
Removed useless code in html testing files.

- Changed logic with how the wiki viewer checks for and uses the forceMP4 flag.

Removed useless code.

- wiki metadata is all coming in as strings, so we need to be careful when we check the values.

Simplify the logic for resizing the instruction overlay.

Renamed player.css to defaultUI.css

Simplify the logic to resize viewer controls.

Simplify the logic in setViewportSize function in timelapse.js

Deprecated viewportGeometry setting.
Viewport size is now defined according to its parent div container.
Viewer is automatically resized to fit the browser window if no css is specified.

Temporarily fixed a bug in the viewer UI loading logic that will be refactored later.

Refactored part of the logic for setting the viewer size initially.
Added more html testing pages.

Refactored the logic for resizing the viewer.

Refactored how the home view is computed.

Refactored the logic for creating a time machine viewer in the DOM.
Refactored the viewer resizing logic.

- Rewrote postmessage.js to be our own wrapper on the postMessage protocol; before it was a library that had many fallbacks/hacks for older browsers. This does mean we lost
cross domain support for older browsers, but they could not have used the viewer anyway. The only scenario that all browsers could handle would be binding some handler based
on the browser compatibility that the viewer reports. Now the page that embeds the viewer will have to do its own detection for older browsers if a fallback is wanted besides
the default message the viewer would display in this case. The API stays the same, so this should be a drop in replacement.

- Further minor changes and clarifications based on the discussion here:
https://github.com/CMU-CREATE-Lab/timemachine-viewer/pull/1#issuecomment-42989532
- Fixed issue with playing/pausing through the cross domain protocol when the time machine is looping.

- Refactored browser detection code. A plus from all this is that if a user forces a video format in the viewer settings and
the browser doesn't actually support it, a message will be displayed rather than a black viewport.

- Minor cleanup: Removed includes from example files that were unnecessary; Fixed syntax errors tripping up older browsers (IE
< 8); Removed unused CSS

- Cleanup to timelapse.js constructor and loadPlayerControlsTemplate()

Refactored the logic for updating the context map and the scale bar.

Added tests for loading views, presentations, and tours from JavaScript or hash.

Renamed flags for defining whether the editor, presentation slider, and annotator are enabled.

Fixed a bug that the hovering textbox on the presentation slider was misplaced.

Updated test pages.

Revived the annotator.

Fixed the way to insert the browser supported message.

Using showEditorOnLoad setting now updates the UI correctly.
Playing a tour now hides the annotator UI.

Fixed a bug that loading tours from JavaScript for several times breaks the custom UI.
Tweaked the button for toggling the annotator.

Clicking on a tag on the annotator now prints the pixel coordinates in the console.

Updated testing html pages.

Changed the default parameters of an annotation.

Fixed a bug related to loading a tour from hash.

Fixed the logic for getting the default loop times in the tour.

Made the findExactOrClosestCaptureTime() function public.

Added a function for removing the video-made-visible listener.

Dragging the timeline on default UI now pauses the video if it is playing.

When creating a new timeline after loading a new dataset, remove all previously added mousedown events.

- Refactored the logic for how views are initiialy set and how we seek upon page load. For the case of initially loading a dataset, this has reduced the
number of times a video is loaded or seeked by about half.
- Bug fixes that came about as a result of the refactor above.

Added the ability to pass in a desired date when loading a new timelapse.

Improved the comment.