Modify to dashArray

Make each hole in dash represent a missing resonator
This commit is contained in:
Xelio 2013-02-14 14:21:07 +08:00
parent 841223f837
commit 1a00840f45

View File

@ -103,7 +103,9 @@ window.plugin.portalWeakness.portalAdded = function(data) {
var params = {fillColor: color, fillOpacity: fill_opacity, radius: data.portal.options.radius+1};
if(resCount<8)
{
params["dashArray"] = "4,6";
// Hole per missing resonator
var dash = new Array(8-resCount + 1).join("1,4,") + "100,0"
params["dashArray"] = dash;
}
data.portal.setStyle(params);
}