1
0
Fork 0
forked from 0x2620/oxjs

cleanup, again

This commit is contained in:
rolux 2011-11-03 16:42:41 +01:00
commit 094b1a59ec
34 changed files with 93 additions and 101 deletions

View file

@ -521,7 +521,7 @@ Ox.ListMap = function(options, self) {
type: 'float'
}).hide()
]);
self.$placeForm = Ox.Form({
items: self.$placeFormItems,
width: 240

View file

@ -654,7 +654,7 @@ Ox.Map = function(options, self) {
}
function getMetersPerPixel() {
// m/px = m/deg * deg/px
// m/px = m/deg * deg/px
var degreesPerPixel = 360 / (Ox.MAP_TILE_SIZE * Math.pow(2, self.map.getZoom()));
return Ox.getMetersPerDegree(self.map.getCenter().lat()) * degreesPerPixel;
}
@ -883,10 +883,10 @@ Ox.Map = function(options, self) {
if (!self.isAsync) {
self.places.sort(function(a, b) {
var sort = {
a: a.selected ? Infinity :
bounds.contains(a.center) ? a.area : -Infinity,
b: b.selected ? Infinity :
bounds.contains(b.center) ? b.area : -Infinity,
a: a.selected ? Infinity
: bounds.contains(a.center) ? a.area : -Infinity,
b: b.selected ? Infinity
: bounds.contains(b.center) ? b.area : -Infinity,
};
return sort.b - sort.a;
}).forEach(function(place, i) {
@ -1434,7 +1434,7 @@ Ox.Map = function(options, self) {
that.removePlace = function() {
// fixme: removePlaceFromPlaces() ?
removePlace();
return that;
return that;
};
that.resizeMap = function() {

View file

@ -274,7 +274,7 @@ Ox.MapMarker = function(options) {
google.maps.event.addListener(that.marker, 'dragend', dragend);
return that;
};
/*@
remove <f> remove marker
() -> <f> remove marker from map, returns MapMarker

View file

@ -16,7 +16,7 @@ Ox.MapPlace <f> MapPlace Object
south <n|0>
type <s|''>
visible <b|false>
west <n|0>
west <n|0>
@*/
Ox.MapPlace = function(options) {
@ -34,7 +34,7 @@ Ox.MapPlace = function(options) {
south: 0,
type: '',
visible: false,
west: 0
west: 0
}, options);
var that = this;
@ -202,7 +202,7 @@ Ox.MapPlace = function(options) {
that.map.triggerEvent('changeplace', that);
return that;
};
/*@
undo <f> undo
@*/

View file

@ -119,5 +119,5 @@ Ox.MapRectangle = function(options, self) {
}
return that;
};

View file

@ -66,8 +66,8 @@ Ox.MapRectangleMarker = function(options, self) {
if (that.position.indexOf('e') > -1) {
that.place.east = lng;
}
Ox.print('west', that.place.west, 'east', that.place.east);
Ox.print('south', that.place.south, 'north', that.place.north);
//Ox.print('west', that.place.west, 'east', that.place.east);
//Ox.print('south', that.place.south, 'north', that.place.north);
that.place.update();
that.place.marker.update();
that.place.rectangle.update();