Interactive interface for browsing global, full-resolution satellite imagery
added animation react widget
Benjamin3fd973fced2a
diff --git a/web/css/wv.anim.widget.css b/web/css/wv.anim.widget.cssnew file mode 100644index 000000000..bf60ebdbc--- /dev/null+++ b/web/css/wv.anim.widget.css@@ -0,0 +1,127 @@+#wv-animation-widget {+ width: 330px;+ border-radius: 8px;+ height: 50px;+ background: #212121;+ position: absolute;+ transform: translateX(-50%);+ top: -150px;+ left: 50%;+ display: none;+}+#wv-animation-widget.wv-active {+ display: block;+}+#wv-animation-widget > a, #wv-animation-widget > div {+ display: inline-block;+ margin: 7px 0 0 10px;+}++#wv-animation-widget .wv-icon-case {+ display: inline-block;+ height: 35px;+ width: 42px;+ background: #295f92;+ position: relative;+ border-radius: 5px;+}++#wv-animation-widget a .wv-animation-widget-icon {+ font-size: 28px;+ color: #fff;+ position: absolute;+ transform: translate(-50%, -50%);+ left: 50%;+ top: 50%;+}++#wv-animation-widget div .wv-slider-label {+ font-size: 10px;+ color: #fff;+ display: block;+ text-align: center;+}+/*+ * Slider styles+ *+ * modified from https://github.com/davidchin/react-input-range+ */+.InputRange-slider {+ -webkit-appearance: none;+ -moz-appearance: none;+ appearance: none;+ background: #3f51b5;+ border: 1px solid #3f51b5;+ border-radius: 100%;+ cursor: pointer;+ display: block;+ height: 1rem;+ margin-left: -0.5rem;+ margin-top: -0.65rem;+ outline: none;+ position: absolute;+ top: 50%;+ transition: -webkit-transform 0.3s ease-out, box-shadow 0.3s ease-out;+ transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;+ width: 1rem; }+ .InputRange-slider:active {+ -webkit-transform: scale(1.3);+ transform: scale(1.3); }+ .InputRange-slider:focus {+ box-shadow: 0 0 0 5px rgba(63, 81, 181, 0.2); }+ .InputRange.is-disabled .InputRange-slider {+ background: #cccccc;+ border: 1px solid #cccccc;+ box-shadow: none;+ -webkit-transform: none;+ transform: none; }++.InputRange-sliderContainer {+ transition: left 0.3s ease-out; }++.InputRange-label {+ color: #aaaaaa;+ font-family: "Helvetica Neue", san-serif;+ font-size: 0.8rem;+ white-space: nowrap; }++.InputRange-label--min,+.InputRange-label--max {+ display: none;+}+.InputRange-label--value {+ position: absolute;+ top: -1.8rem; }++.InputRange-labelContainer {+ left: -50%;+ position: relative; }+ .InputRange-label--max .InputRange-labelContainer {+ left: 50%; }++.InputRange-track {+ background: #eeeeee;+ border-radius: 0.3rem;+ display: block;+ height: 0.3rem;+ position: relative;+ transition: left 0.3s ease-out, width 0.3s ease-out; }+ .InputRange.is-disabled .InputRange-track {+ background: #eeeeee; }++.InputRange-track--container {+ left: 0;+ margin-top: -0.15rem;+ position: absolute;+ right: 0;+ top: 50%; }++.InputRange-track--active {+ background: #3f51b5; }++.InputRange {+ cursor: pointer;+ margin-bottom: 4px;+ height: 1rem;+ position: relative;+ width: 152px; }diff --git a/web/js/date/wv.date.anim.ui.js b/web/js/date/wv.date.anim.ui.jsnew file mode 100644index 000000000..beb993f60--- /dev/null+++ b/web/js/date/wv.date.anim.ui.js@@ -0,0 +1,41 @@+/*+ * NASA Worldview+ *+ * This code was originally developed at NASA/Goddard Space Flight Center for+ * the Earth Science Data and Information System (ESDIS) project.+ *+ * Copyright (C) 2013 - 2014 United States Government as represented by the+ * Administrator of the National Aeronautics and Space Administration.+ * All Rights Reserved.+ *+ * Licensed under the NASA Open Source Agreement, Version 1.3+ * http://opensource.gsfc.nasa.gov/nosa.php+ */+ /** @jsx React.DOM */++var wv = wv || {};+wv.date = wv.date || {};++wv.date.anim = wv.date.anim || {};++wv.date.anim.ui = wv.date.anim.ui || function(models) {+ var self = this;+ var Factory = React.createFactory(Animate.AnimationWidget);+ var widget = Factory({+ callback: this.onPressPlay,+ label: 'Frames Per Second'+ });+ var $animateButton = $('#animate-button')+ self.init = function() {+ ReactDOM.render(widget, $('#wv-animation-widet-case')[0]);+ self.$widgetCase = $('#wv-animation-widget');+ $animateButton.on('click', self.toggleAnimationWidget)+ };+ self.toggleAnimationWidget = function() {+ return self.$widgetCase.toggleClass('wv-active');+ };+ self.onPressPlay = function(args) {+ console.log(args)+ }+ self.init();+}\ No newline at end of file