Skip to content

Commit

Permalink
Merge pull request #640 from nasa-gibs/module-loaders-animation
Browse files Browse the repository at this point in the history
Module loaders for animation feature
  • Loading branch information
Benjaki2 authored Jan 3, 2018
2 parents 176d26b + a21172e commit 0bf6530
Show file tree
Hide file tree
Showing 15 changed files with 284 additions and 287 deletions.
58 changes: 29 additions & 29 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,12 @@
"browser": {
"d3": "./web/ext/d3/d3.js",
"isotope-layout": "./node_modules/isotope-layout/dist/isotope.pkgd.js",
"jquery-jcrop": "./node_modules/jquery-jcrop/js/jquery.Jcrop.js",
"jquery": "./node_modules/jquery/dist/jquery.js"
},
"browserify-shim": {
"isotope-layout": "isotope",
"jquery-jcrop": "Jcrop",
"jquery": "$"
}
}
4 changes: 3 additions & 1 deletion web/css/anim.widget.css
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,9 @@
color: #999;
cursor: pointer;
}

.gif-dialog {
color: #fff;
}
.gif-dialog .content {
line-height: 15px;
}
Expand Down
19 changes: 19 additions & 0 deletions web/css/jquery-ui-override.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Default jquery-ui button
*/
a.ui-button.ui-state-default {
color: #eee;
font-weight: 700;
border: 1px solid #666;
font-size: 1em;
background-image: linear-gradient(#555, #666);
background-image: -ms-linear-gradient(#555, #666);
background-image: -o-linear-gradient(#555, #666);
font-family: "Segoe UI", "Arial", sans-serif;
}
a.ui-button.ui-state-default.ui-state-hover {
border-color: #eee;
background-color: #eee;
background-image: none;
color: #404040;
}
1 change: 1 addition & 0 deletions web/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@
@import url("tooltip.css");
@import url("mobile.css");
@import url("../pages/css/document.css");
@import url("jquery-ui-override.css");
29 changes: 29 additions & 0 deletions web/js/animation/anim.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import loEach from 'lodash/each';

export function parse (state, errors) {
if (state.a) {
var str = state.a;
var astate = {
attributes: []
};

// Get text before (
var on = str.match(/[^\(,]+/)[0];
if (on !== 'on') { // don't do anything if wrong format
state.a = undefined;
return;
}

// remove (, get key value pairs
str = str.match(/\(.*\)/)[0].replace(/[\(\)]/g, '');
var kvps = str.split(',');
loEach(kvps, function (kvp) {
var parts = kvp.split('=');
astate.attributes.push({
id: parts[0],
value: parts[1]
});
});
state.a = astate;
}
};
Loading

0 comments on commit 0bf6530

Please sign in to comment.