My favorites | Sign in
Project Logo
             
New issue | Search
for
| Advanced search | Search tips
Issue 19: Need a setLabelText function in LabeledMarker
7 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  s.n.ushakov
Closed:  Dec 2008
Type-Enhancement
Priority-Medium
Class-LabeledMarker


Sign in to add a comment
 
Reported by g...@luxcentral.com, Jan 08, 2008
LabeledMarker could be improved by adding a routine which would allow an application to 
dynamically change the text of a label. This could be in response to a change in a preference 
setting check box, for example.

The fix is simple, add this function to the LabeledMarker Class:

LabeledMarker.prototype.setLabelText = function( newText ) {
	this.labelText_ = newText;
	this.div_.innerHTML = newText;
}


Also related to LabeledMarker 1.1, I notice that the show() and hide() routines alter the visibility 
style property.  I've always felt that it is best to alter the display property instead for showing 
(display: anything) and hiding (display: none) -- this should improve performance if you have 
lots of markers because the browser, when rendering a page, will ignore a display:none label div 
completely instead of having to calculate the size of the space to allocate for each 
visibility:hidden div.

However, I'm not sure what the show and hide code for a standard marker looks like -- I 
suppose if this code alters the visibility property, the code for hiding/showing the labels should 
follow suit. Or maybe the marker code should be changed??

 
Comment 1 by lem...@gmail.com, May 22, 2008
(No comment was entered for this change.)
Labels: Class-LabeledMarker
Comment 2 by lem...@gmail.com, May 25, 2008
Second idea moved to Issue 35.
Status: Accepted
Owner: lemnar
Labels: -Type-Defect Type-Enhancement
Comment 3 by pamela.fox, Dec 26, 2008
(No comment was entered for this change.)
Status: Fixed
Owner: s.n.ushakov
Sign in to add a comment

Hosted by Google Code