1
0
Fork 0
forked from 0x2620/oxjs

minor changes

This commit is contained in:
rlx 2012-01-17 23:26:26 +05:30
commit 1bf1eae034
5 changed files with 25 additions and 16 deletions

View file

@ -31,7 +31,10 @@ Ox.MapMarkerImage = (function() {
if (!cache[index]) {
var color = options.type == 'rectangle' ? [0, 0, 0, 0]
: Ox.merge(Ox.clone(options.color), [options.type == 'place' ? 0.75 : 0.25]),
: Ox.merge(
Ox.clone(options.color),
[options.type == 'place' ? 0.75 : 0.25]
),
border = Ox.merge(
options.mode == 'normal' ? [0, 0, 0]
: options.mode == 'selected' ? [255, 255, 255]
@ -55,7 +58,6 @@ Ox.MapMarkerImage = (function() {
new google.maps.Point(0, 0),
new google.maps.Point(r, r)
);
//Ox.Log('Map', options, 'index', index)
}
return cache[index];

View file

@ -65,10 +65,10 @@ Ox.MapPlace = function(options) {
w: new google.maps.LatLng(that.lat, that.west),
});
// fixme: use bounds.toSpan()
that.sizeNorthSouth = (that.north - that.south) *
Ox.EARTH_CIRCUMFERENCE / 360;
that.sizeEastWest = (that.east + (that.west > that.east ? 360 : 0) - that.west) *
Ox.getMetersPerDegree(that.lat);
that.sizeNorthSouth = (that.north - that.south)
* Ox.EARTH_CIRCUMFERENCE / 360;
that.sizeEastWest = (that.east + (that.west > that.east ? 360 : 0) - that.west)
* Ox.getMetersPerDegree(that.lat);
that.area = Ox.getArea(
{lat: that.south, lng: that.west},
{lat: that.north, lng: that.east}

View file

@ -46,7 +46,11 @@ Ox.MapRectangle = function(options, self) {
setOptions();
function click() {
if (that.map.options('editable') && that.place.editable && !that.place.editing) {
if (
that.map.options('editable')
&& that.place.editable
&& !that.place.editing
) {
that.place.edit();
} else if (that.map.getKey() == 'meta') {
that.place.submit();