From d95d13f13dfba3d90324c51453a31b6d2151d7fe Mon Sep 17 00:00:00 2001 From: rolux Date: Mon, 2 Jul 2012 13:36:37 +0200 Subject: [PATCH] update cities example --- examples/lists/cities/js/example.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/examples/lists/cities/js/example.js b/examples/lists/cities/js/example.js index da227fc3..bfaeb96e 100644 --- a/examples/lists/cities/js/example.js +++ b/examples/lists/cities/js/example.js @@ -15,7 +15,7 @@ Ox.load({UI: {showScreen: true}, Geo: {}}, function() { Ox.getJSON('json/cities.json', function(cities) { /* - The JSON data originally comes from + The data originally comes from geonames.org. It's an array of 10,000 city objects, each of which has the following properties: @@ -546,9 +546,7 @@ Ox.load({UI: {showScreen: true}, Geo: {}}, function() { will cause a deselect, which is what we want here.) */ select: function(data) { - $list.options({ - selected: data.place ? [data.place.id] : [] - }); + $list.options({selected: data.id ? [data.id] : []}); } }), /* @@ -569,7 +567,7 @@ Ox.load({UI: {showScreen: true}, Geo: {}}, function() { elements: [ { /* - Elements of a split panel trigger `resize` and + Elements of a split panel fire `resize` and `resizeend` events when they are resized. Here, we make sure that the find element shrinks accordingly. */ @@ -600,9 +598,7 @@ Ox.load({UI: {showScreen: true}, Geo: {}}, function() { notification when the map size changes. The map's `resizeMap` method takes care of that. */ - element: $map.bindEvent({ - resizeend: $map.resizeMap - }) + element: $map.bindEvent({resizeend: $map.resizeMap}) } ], orientation: 'horizontal'