1
0
Fork 0
forked from 0x2620/oxjs

add tooltips to map place info; fix a bug with autocomplete and live updates (fixes #453)

This commit is contained in:
rlx 2012-02-15 16:13:09 +00:00
commit 972808eb17
4 changed files with 19 additions and 16 deletions

View file

@ -897,9 +897,9 @@ Ox.ListMap = function(options, self) {
function removeItem(data) {
var id = data.ids[0];
// fixme: events or callback functions??
self.$list.value(id, 'type') && self.$map.removePlace(id);
// FIXME: events or callback functions??
that.triggerEvent('removeplace', {id: id});
self.$map.removePlace(id);
}
function removePlace() {

View file

@ -415,7 +415,8 @@ Ox.Map = function(options, self) {
flag: Ox.Element()
.addClass('OxPlaceControl OxPlaceFlag'),
name: Ox.Label({
textAlign: 'center'
textAlign: 'center',
tooltip: 'Click to pan, doubleclick to zoom'
})
.addClass('OxPlaceControl OxPlaceName')
.bindEvent({
@ -428,6 +429,7 @@ Ox.Map = function(options, self) {
}),
deselectButton: Ox.Button({
title: 'close',
tooltip: 'Deselect',
type: 'image',
})
.addClass('OxPlaceControl OxPlaceDeselectButton')
@ -555,10 +557,7 @@ Ox.Map = function(options, self) {
function centerChanged() {
var tooltip = $('.OxMapMarkerTooltip');
if (tooltip.length) {
Ox.Log('Map', '??', tooltip[0].className, $(tooltip[0]).data('oxid'));
Ox.UI.elements[$(tooltip[0]).data('oxid')].hide();
}
tooltip.length && Ox.UI.elements[$(tooltip[0]).data('oxid')].hide();
self.center = self.map.getCenter();
self.centerChanged = true;
}