updating listmap

This commit is contained in:
rolux 2011-06-01 10:39:33 +02:00
parent 0c88632437
commit 60d6c2a166
3 changed files with 28 additions and 6 deletions

View file

@ -237,7 +237,12 @@ Ox.ListMap = function(options, self) {
] ]
}) })
.css({float: 'right', margin: '4px'}) .css({float: 'right', margin: '4px'})
.appendTo(self.$listToolbar) .bindEvent({
change: function(data) {
}
})
.appendTo(self.$listToolbar);
self.$list = Ox.TextList({ self.$list = Ox.TextList({
columns: self.columns, columns: self.columns,

View file

@ -1019,6 +1019,7 @@ Ox.Map = function(options, self) {
}, results.data.items[0])).add(); }, results.data.items[0])).add();
self.places.push(place); self.places.push(place);
select(); select();
that.panToPlace();
}); });
} }
} else { } else {
@ -1207,12 +1208,20 @@ Ox.Map = function(options, self) {
key = 'meta' key = 'meta'
} }
return key; return key;
} };
/*
that.editPlace = function() { that.editPlace = function() {
getPlaceById(self.options.selected).edit(); getPlaceById(self.options.selected).edit();
return that; return that;
} };
*/
that.editPlace = function(data) {
var place = getPlaceById(self.options.selected);
place.$marker.options(data);
return that;
};
that.findPlace = function(name, callback) { that.findPlace = function(name, callback) {
getPlaceByName(name, function(place) { getPlaceByName(name, function(place) {

View file

@ -14,7 +14,7 @@ Ox.MapPlace <f> MapPlace Object
north <n|0> north <n|0>
selected <b|false> selected <b|false>
south <n|0> south <n|0>
type <a|[]> type <s|''>
visible <b|false> visible <b|false>
west <n|0> west <n|0>
@*/ @*/
@ -32,7 +32,7 @@ Ox.MapPlace = function(options) {
north: 0, north: 0,
selected: false, selected: false,
south: 0, south: 0,
type: [], type: '',
visible: false, visible: false,
west: 0 west: 0
}, options); }, options);
@ -145,7 +145,15 @@ Ox.MapPlace = function(options) {
that.rectangle.select(); that.rectangle.select();
} }
return that; return that;
} };
// fixme: make this an Ox.Element to get options handling for free?
that.options = function(options) {
Ox.forEach(function(value, key) {
that.key = value;
});
update();
};
/*@ /*@
remove <f> remove remove <f> remove