forked from 0x2620/oxjs
correct transparency of result place rectangle and rectangle markers (fixes #312)
This commit is contained in:
parent
f317e6ccf0
commit
2ed61c7b08
4 changed files with 21 additions and 10 deletions
|
|
@ -64,12 +64,13 @@ Ox.MapRectangle = function(options, self) {
|
|||
function setOptions() {
|
||||
var color = that.place.editing ? '#8080FF' : '#FFFFFF';
|
||||
that.rectangle.setOptions({
|
||||
bounds: that.place.bounds,
|
||||
fillColor: color,
|
||||
fillOpacity: that.place.editing ? 0.1 : 0,
|
||||
strokeColor: color,
|
||||
strokeOpacity: 1,
|
||||
strokeOpacity: that.place.id[0] == '_' ? 0.5 : 1,
|
||||
strokeWeight: 2
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/*@
|
||||
|
|
@ -90,6 +91,7 @@ Ox.MapRectangle = function(options, self) {
|
|||
Ox.forEach(that.markers, function(marker) {
|
||||
marker.remove();
|
||||
});
|
||||
return that;
|
||||
};
|
||||
|
||||
/*@
|
||||
|
|
@ -98,7 +100,7 @@ Ox.MapRectangle = function(options, self) {
|
|||
that.remove = function() {
|
||||
that.rectangle.setMap(null);
|
||||
google.maps.event.clearListeners(that.rectangle);
|
||||
return that
|
||||
return that;
|
||||
}
|
||||
|
||||
/*@
|
||||
|
|
@ -109,6 +111,7 @@ Ox.MapRectangle = function(options, self) {
|
|||
Ox.forEach(that.markers, function(marker) {
|
||||
marker.add();
|
||||
});
|
||||
return that;
|
||||
};
|
||||
|
||||
/*@
|
||||
|
|
@ -116,12 +119,11 @@ Ox.MapRectangle = function(options, self) {
|
|||
@*/
|
||||
that.update = function() {
|
||||
Ox.Log('Map', 'UPDATE...')
|
||||
that.rectangle.setOptions({
|
||||
bounds: that.place.bounds
|
||||
});
|
||||
setOptions();
|
||||
Ox.forEach(that.markers, function(marker) {
|
||||
marker.update();
|
||||
});
|
||||
return that;
|
||||
}
|
||||
|
||||
return that;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue