forked from 0x2620/oxjs
cleanup, again
This commit is contained in:
parent
2809a5d06d
commit
094b1a59ec
34 changed files with 93 additions and 101 deletions
|
|
@ -521,7 +521,7 @@ Ox.ListMap = function(options, self) {
|
|||
type: 'float'
|
||||
}).hide()
|
||||
]);
|
||||
|
||||
|
||||
self.$placeForm = Ox.Form({
|
||||
items: self.$placeFormItems,
|
||||
width: 240
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
@*/
|
||||
|
|
|
|||
|
|
@ -119,5 +119,5 @@ Ox.MapRectangle = function(options, self) {
|
|||
}
|
||||
|
||||
return that;
|
||||
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue