use themed map rectangles

This commit is contained in:
rolux 2012-12-28 18:00:02 +01:00
parent 641a3043cb
commit 8b8c40d32f

View file

@ -10,12 +10,14 @@ Ox.MapRectangle <f> MapRectangle Object
Ox.MapRectangle = function(options) {
var that = this;
options = Ox.extend({
map: null,
place: null
}, options);
var that = this,
themeData = Ox.Theme.getThemeData();
Ox.forEach(options, function(val, key) {
that[key] = val;
});
@ -57,7 +59,11 @@ Ox.MapRectangle = function(options) {
}
function setOptions() {
var color = that.place.editing ? '#8080FF' : '#FFFFFF';
var color = '#' + Ox.toHex(themeData[
that.place.editing
? 'mapPlaceEditingBorder'
: 'mapPlaceSelectedBorder'
]);
that.rectangle.setOptions({
bounds: that.place.bounds,
fillColor: color,