allow for editing s/w/n/e/ values manually

This commit is contained in:
rlx 2011-06-01 13:53:09 +00:00
parent df27e28c5e
commit 66c8347a2a
4 changed files with 11 additions and 4 deletions

View file

@ -566,7 +566,11 @@ Ox.Input = function(options, self) {
Ox.UI.$document.unbind('keydown', keydown); Ox.UI.$document.unbind('keydown', keydown);
//Ox.UI.$document.unbind('keypress', keypress); //Ox.UI.$document.unbind('keypress', keypress);
} }
that.triggerEvent('blur'); // fixme: for some reason, if options.type is set, no change event fires
// as a workaround, blur sends a value. remove later...
that.triggerEvent('blur', {
value: self.options.value
});
} }
function cancel() { function cancel() {

View file

@ -458,7 +458,7 @@ Ox.ListMap = function(options, self) {
max = ['Latitude', 'South', 'North'].indexOf(v) > -1 ? Ox.MAX_LATITUDE : 180; max = ['Latitude', 'South', 'North'].indexOf(v) > -1 ? Ox.MAX_LATITUDE : 180;
return Ox.Input({ return Ox.Input({
decimals: 8, decimals: 8,
//disabled: true, // ['Latitude', 'Longitude'].indexOf(v) > -1, disabled: ['lat', 'lng'].indexOf(id) > -1,
id: id, id: id,
label: v, label: v,
labelWidth: 80, labelWidth: 80,
@ -468,7 +468,7 @@ Ox.ListMap = function(options, self) {
width: 240 width: 240
}) })
.bindEvent({ .bindEvent({
change: function(data) { blur: function(data) {
///* ///*
var isResult = self.selectedPlace[0] == '_'; var isResult = self.selectedPlace[0] == '_';
if (!self.isAsync) { if (!self.isAsync) {
@ -476,7 +476,7 @@ Ox.ListMap = function(options, self) {
} else { } else {
!isResult && editPlace([v]) !isResult && editPlace([v])
} }
self.$map.value(self.selectedPlace, v, data.value); self.$map.value(self.selectedPlace, id, data.value);
//*/ //*/
} }
}); });

View file

@ -83,6 +83,7 @@ Ox.MapPlace = function(options) {
place: that place: that
}); });
} else if (updateMarker) { } else if (updateMarker) {
Ox.print('UPDATING marker and rectangle ... llswne', that.lat, that.lng, that.south, that.west, that.north, that.east)
that.marker.update(); that.marker.update();
that.rectangle.update(); that.rectangle.update();
} }
@ -155,6 +156,7 @@ Ox.MapPlace = function(options) {
options = Ox.makeObject(arguments); options = Ox.makeObject(arguments);
Ox.forEach(options, function(value, key) { Ox.forEach(options, function(value, key) {
that[key] = value; that[key] = value;
Ox.print('that.' + key, '=', value, '......')
}); });
update(true); update(true);
}; };

View file

@ -109,6 +109,7 @@ Ox.MapRectangle = function(options, self) {
update <f> udpate update <f> udpate
@*/ @*/
that.update = function() { that.update = function() {
Ox.print('UPDATE...')
that.rectangle.setOptions({ that.rectangle.setOptions({
bounds: that.place.bounds bounds: that.place.bounds
}); });