1
0
Fork 0
forked from 0x2620/oxjs

update video editor

This commit is contained in:
rlx 2012-01-16 23:21:53 +05:30
commit 7da384d03a
5 changed files with 98 additions and 38 deletions

View file

@ -850,7 +850,6 @@ Ox.Map = function(options, self) {
if (isEmpty(mapBounds)) {
self.map.setZoom(self.minZoom);
} else {
Ox.print("FITTING BOUNDS")
self.map.fitBounds(mapBounds);
}
}
@ -901,7 +900,7 @@ Ox.Map = function(options, self) {
function mapChanged() {
// gets called after panning or zooming
Ox.Log('Map', 'mapChanged');
Ox.print('Map', 'mapChanged');
if (self.boundsChanged) {
var bounds = self.map.getBounds(),
southWest = bounds.getSouthWest(),
@ -1388,7 +1387,15 @@ Ox.Map = function(options, self) {
Ox.print('MAP SET OPTIONS PLACES', value);
addPlaces();
getMapBounds(function(mapBounds) {
self.map.fitBounds(mapBounds);
if (mapBounds) {
self.map.fitBounds(mapBounds);
} else {
self.map.setZoom(self.minZoom);
self.map.setCenter(new google.maps.LatLng(0, 0));
}
// fixme: the following is just a guess
self.boundsChanged = true;
mapChanged();
});
if (self.options.selected) {
if (getSelectedPlace()) {