use themed map rectangles
This commit is contained in:
parent
641a3043cb
commit
8b8c40d32f
1 changed files with 8 additions and 2 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue