added option to query current layer

This commit is contained in:
DennisSchiefer 2012-05-15 16:24:10 +01:00
parent b85849b6bd
commit 8d40bc7f4f

View File

@ -30,5 +30,18 @@ getActiveLayerName: function () {
return obj.name;
}
}
},
getActiveLayer: function () {
var i, input, obj,
inputs = this._form.getElementsByTagName('input'),
inputsLen = inputs.length;
for (i = 0; i < inputsLen; i++) {
input = inputs[i];
obj = this._layers[input.layerId];
if (input.checked && !obj.overlay) {
return obj.layer;
}
}
}
});