fixed synapse creation. replaced homepage bg image
This commit is contained in:
parent
0e3393e1b5
commit
da6a7aadfb
5 changed files with 55 additions and 23 deletions
Binary file not shown.
Before Width: | Height: | Size: 128 KiB |
BIN
app/assets/images/homepage_bg_fade.png
Normal file
BIN
app/assets/images/homepage_bg_fade.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 110 KiB |
|
@ -215,7 +215,7 @@
|
|||
if (href.attr === "") Metamaps.Router.home();
|
||||
else {
|
||||
console.log(segments);
|
||||
Metamaps.Router[segments[0]](segments[1]);
|
||||
Metamaps.Router[segments[0]](segments[1], segments[2]);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -749,6 +749,10 @@ Metamaps.Create = {
|
|||
if (datum.id) { // if they clicked on an existing synapse get it
|
||||
Metamaps.Synapse.getSynapseFromAutocomplete(datum.id);
|
||||
}
|
||||
else {
|
||||
Metamaps.Create.newSynapse.description = datum.value;
|
||||
Metamaps.Synapse.createSynapseLocally();
|
||||
}
|
||||
});
|
||||
},
|
||||
beingCreated: false,
|
||||
|
@ -3469,13 +3473,44 @@ Metamaps.Filter = {
|
|||
else console.log(topic);
|
||||
}
|
||||
});
|
||||
|
||||
// flag all the edges back to 'untouched'
|
||||
Metamaps.Synapses.each(function(synapse) {
|
||||
var e = synapse.get('edge');
|
||||
var desc = synapse.get("desc");
|
||||
e.setData('touched', false);
|
||||
});
|
||||
Metamaps.Synapses.each(function(synapse) {
|
||||
var e = synapse.get('edge');
|
||||
var desc;
|
||||
var user_id = synapse.get("user_id").toString();
|
||||
|
||||
if (visible.synapses.indexOf(desc) == -1) passesSynapse = false;
|
||||
else passesSynapse = true;
|
||||
if (e && !e.getData('touched')) {
|
||||
|
||||
var synapses = e.getData('synapses');
|
||||
|
||||
// if any of the synapses represent by the edge are still unfiltered
|
||||
// leave the edge visible
|
||||
passesSynapse = false;
|
||||
for (var i = 0; i < synapses.length; i++) {
|
||||
desc = synapses[i].get("desc");
|
||||
if (visible.synapses.indexOf(desc) > -1) passesSynapse = true;
|
||||
}
|
||||
|
||||
// if the synapse description being displayed is now being
|
||||
// filtered, set the displayIndex to the first unfiltered synapse if there is one
|
||||
var displayIndex = e.getData("displayIndex") ? e.getData("displayIndex") : 0;
|
||||
var displayedSynapse = synapses[displayIndex];
|
||||
desc = displayedSynapse.get("desc");
|
||||
if (passesSynapse && visible.synapses.indexOf(desc) == -1) {
|
||||
// iterate and find an unfiltered one
|
||||
for (var i = 0; i < synapses.length; i++) {
|
||||
desc = synapses[i].get("desc");
|
||||
if (visible.synapses.indexOf(desc) > -1) {
|
||||
e.setData('displayIndex', i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (onMap) {
|
||||
// when on a map,
|
||||
|
@ -3488,19 +3523,17 @@ Metamaps.Filter = {
|
|||
|
||||
var color = Metamaps.Settings.colors.synapses.normal;
|
||||
if (passesSynapse && passesMapper) {
|
||||
if (e) {
|
||||
e.setData('alpha', 1, 'end');
|
||||
e.setData('color', color, 'end');
|
||||
}
|
||||
else console.log(synapse);
|
||||
}
|
||||
else {
|
||||
if (e) {
|
||||
Metamaps.Control.deselectEdge(e, true);
|
||||
e.setData('alpha', opacityForFilter, 'end');
|
||||
}
|
||||
else console.log(synapse);
|
||||
|
||||
e.setData('touched', true);
|
||||
}
|
||||
else if (!e) console.log(synapse);
|
||||
});
|
||||
|
||||
// run the animation
|
||||
|
@ -4538,7 +4571,6 @@ Metamaps.Map = {
|
|||
encoded_image: canvas.canvas.toDataURL()
|
||||
};
|
||||
|
||||
console.log(imageData.encoded_image);
|
||||
var map = Metamaps.Active.Map;
|
||||
|
||||
var today = new Date();
|
||||
|
|
|
@ -802,10 +802,10 @@
|
|||
}
|
||||
|
||||
.fullWidthWrapper.withPartners {
|
||||
background: url(homepage_bg.png) no-repeat center -300px;
|
||||
background: url(homepage_bg_fade.png) no-repeat center -300px;
|
||||
}
|
||||
.homeWrapper.homePartners {
|
||||
padding: 64px 0 100px;
|
||||
padding: 64px 0 280px;
|
||||
height: 96px;
|
||||
background: url(partner_logos.png) no-repeat 0 64px;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue