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:
parent
96db09337c
commit
972808eb17
4 changed files with 19 additions and 16 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue