highlight portales without mods red as before,

but hightlight also free slots as yellow
This commit is contained in:
root 2013-08-16 16:59:25 +02:00
parent f3aa8850b1
commit b2c4b10ab9

View File

@ -59,22 +59,27 @@ window.plugin.portalHighligherMods.highlight = function(data, mod_type) {
window.plugin.portalHighligherMods.highlightNoMods = function(data) {
var d = data.portal.options.details;
var mods = false;
var mods = 0;
$.each(d.portalV2.linkedModArray, function(ind, mod) {
if(mod !== null) {
mods = true;
return;
mods += 1;
}
});
if(!mods) {
if(mods == 0) {
var fill_opacity = .6;
var color = 'red';
var params = {fillColor: color, fillOpacity: fill_opacity};
data.portal.setStyle(params);
window.COLOR_SELECTED_PORTAL = '#f0f';
} else if(mods <4) {
var fill_opacity = .6;
var color = 'yellow';
var params = {fillColor: color, fillOpacity: fill_opacity};
data.portal.setStyle(params);
window.COLOR_SELECTED_PORTAL = '#f0f';
}
window.COLOR_SELECTED_PORTAL = '#f0f';
}