From 8b8c40d32f1b78d3918f4fa90b3950c593f3ed4b Mon Sep 17 00:00:00 2001 From: rolux Date: Fri, 28 Dec 2012 18:00:02 +0100 Subject: [PATCH] use themed map rectangles --- source/Ox.UI/js/Map/MapRectangle.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/Ox.UI/js/Map/MapRectangle.js b/source/Ox.UI/js/Map/MapRectangle.js index 70dcaaba..ac43c923 100644 --- a/source/Ox.UI/js/Map/MapRectangle.js +++ b/source/Ox.UI/js/Map/MapRectangle.js @@ -10,12 +10,14 @@ Ox.MapRectangle 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,