forked from 0x2620/oxjs
Ox.getPositionById() -> Ox.getIndexById()
This commit is contained in:
parent
4ca01b2bfa
commit
8097cc7812
19 changed files with 23 additions and 30 deletions
|
|
@ -770,7 +770,7 @@ Ox.ListMap = function(options, self) {
|
|||
Ox.Log('Map', 'REMOVE PLACE', self.selectedPlace, index)
|
||||
if (!self.isAsync) {
|
||||
// fixme: doesn't call self.options.removePlace!
|
||||
index = Ox.getPositionById(self.options.places, self.selectedPlace);
|
||||
index = Ox.getIndexById(self.options.places, self.selectedPlace);
|
||||
self.options.places.splice(index, 1);
|
||||
self.$list.options({items: Ox.clone(self.options.places)});
|
||||
//setStatus();
|
||||
|
|
|
|||
|
|
@ -1104,7 +1104,7 @@ Ox.Map = function(options, self) {
|
|||
place.id = '_' + place.id;
|
||||
self.options.selected = place.id;
|
||||
//Ox.Log('Map', 'removePlace', Ox.getObjectById(self.places, place.id))
|
||||
self.places.splice(Ox.getPositionById(self.places, place.id), 1);
|
||||
self.places.splice(Ox.getIndexById(self.places, place.id), 1);
|
||||
self.resultPlace && self.resultPlace.remove();
|
||||
self.resultPlace = place;
|
||||
place.marker.update();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue