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) {
|
Ox.MapRectangle = function(options) {
|
||||||
|
|
||||||
var that = this;
|
|
||||||
options = Ox.extend({
|
options = Ox.extend({
|
||||||
map: null,
|
map: null,
|
||||||
place: null
|
place: null
|
||||||
}, options);
|
}, options);
|
||||||
|
|
||||||
|
var that = this,
|
||||||
|
themeData = Ox.Theme.getThemeData();
|
||||||
|
|
||||||
Ox.forEach(options, function(val, key) {
|
Ox.forEach(options, function(val, key) {
|
||||||
that[key] = val;
|
that[key] = val;
|
||||||
});
|
});
|
||||||
|
@ -57,7 +59,11 @@ Ox.MapRectangle = function(options) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function setOptions() {
|
function setOptions() {
|
||||||
var color = that.place.editing ? '#8080FF' : '#FFFFFF';
|
var color = '#' + Ox.toHex(themeData[
|
||||||
|
that.place.editing
|
||||||
|
? 'mapPlaceEditingBorder'
|
||||||
|
: 'mapPlaceSelectedBorder'
|
||||||
|
]);
|
||||||
that.rectangle.setOptions({
|
that.rectangle.setOptions({
|
||||||
bounds: that.place.bounds,
|
bounds: that.place.bounds,
|
||||||
fillColor: color,
|
fillColor: color,
|
||||||
|
|
Loading…
Reference in a new issue