kindve ugly fixes to get overlays to work right
This commit is contained in:
parent
60bcd54c60
commit
7fdc1600ba
|
@ -93,7 +93,7 @@ function onFeatureSelect(f) {
|
||||||
'height': height + "px",
|
'height': height + "px",
|
||||||
'display': 'none'
|
'display': 'none'
|
||||||
}
|
}
|
||||||
$('<div />').addClass('highlightOverlay').css(overlayCss).appendTo('body').fadeTo(100, 0.5).click(function() {
|
$('<div />').addClass('highlightOverlay').css(overlayCss).appendTo('body').css({"opacity": "0.4", "display": "block"}).click(function() {
|
||||||
$img.click();
|
$img.click();
|
||||||
});
|
});
|
||||||
// currentlySelectedFeature = f;
|
// currentlySelectedFeature = f;
|
||||||
|
@ -254,14 +254,40 @@ $('.flyoverImage').live("mouseover", function() {
|
||||||
}
|
}
|
||||||
mapControl.select(flyover);
|
mapControl.select(flyover);
|
||||||
$(this).data("flyover", flyover);
|
$(this).data("flyover", flyover);
|
||||||
// currentlySelectedFeature = flyover;
|
$(this).addClass("currentlySelectedImage");
|
||||||
|
currentlySelectedFeature = flyover;
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.flyoverImage').live("mouseout", function() {
|
$('.flyoverImage').live("mouseout", function() {
|
||||||
|
|
||||||
|
//FIXME: my eyes peel in misery.. - done because texts dont have overlays. maybe the correct fix here is to edit the js to give texts some sort of overlay instead of hard-coding to $img nonsense.
|
||||||
|
if (!($('.highlightOverlay').length > 0 && $('.highlightOverlay').is(':visible'))) {
|
||||||
|
currentlySelectedFeature = false;
|
||||||
|
}
|
||||||
|
|
||||||
// console.log(currentlySelectedFeature);
|
// console.log(currentlySelectedFeature);
|
||||||
mapControl.unselect($(this).data("flyover"));
|
var flyover = $(this).data("flyover");
|
||||||
|
console.log("mouseout", flyover);
|
||||||
|
//FIXME: this relies on some very subtle bullshit.
|
||||||
|
if (flyover == currentlySelectedFeature) {
|
||||||
|
// console.log("falsey");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
mapControl.unselect($(this).data("flyover"));
|
||||||
|
$(this).removeClass("currentlySelectedImage");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//FIXME: this is not even a fixme, this is just the end of the sanity of this code. But, the highlights on the thumbnails alongwith selects on map should now work. woohoo.
|
||||||
|
//hmm so this whole thing behaves a bit strange.
|
||||||
|
|
||||||
|
$('.highlightOverlay').live("mouseout", function() {
|
||||||
|
currentlySelectedFeature = false;
|
||||||
|
$('.currentlySelectedImage').mouseout();
|
||||||
|
// $('.currentlySelectedImage').removeClass("currentlySelectedImage");
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$('#submitQuestions').live("click", function() {
|
$('#submitQuestions').live("click", function() {
|
||||||
$(this).attr("disabled", "disabled");
|
$(this).attr("disabled", "disabled");
|
||||||
$(this).text("Thanks!");
|
$(this).text("Thanks!");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user