[OpenLayers-Users] Scrollbars in popup

Burgholzer,Robert rwburgholzer at deq.virginia.gov
Thu Jul 12 11:25:26 EDT 2007


I hope I will not get in trouble for cross-posting, but I will post this
to the DEV listserv also.  A small modification to the code in
"lib\OpenLayers\Layer\Text.js" and " lib\OpenLayers\Feature.js" will
permit the specification of overflow by including the column "overflow"
in the text file that is read to create Text Features.  It does nothing
if the text file does not possess this column.  

I put the modified lines here:

lib\OpenLayers\Layers\Text.js (Diff output):
71c71
<                     var icon, iconSize, iconOffset, overflow;
---
>                     var icon, iconSize, iconOffset;
101,102d101
<                             } else if (columns[valIndex] ==
'overflow') {
<                                 overflow = vals[valIndex];
128,130d126
<                       if ((overflow != null) ) {
<                           data['overflow'] = overflow;
<                       }


lib\OpenLayers\Feature.js (Diff output):
149,154d149
< 
<         if (this.data.overflow != null) {
<            this.popup.contentDiv.style.overflow = this.data.overflow;
<         }
< 
<         //this.popup.contentDiv.style.overflow = 'auto';

-----Original Message-----
From: John Cole [mailto:john.cole at uai.com] 
Sent: Thursday, July 12, 2007 10:57 AM
To: 'Christopher Schmidt'; Burgholzer,Robert
Cc: users at openlayers.org
Subject: RE: [OpenLayers-Users] Scrollbars in popup

That works, but there is a FF bug that affects this.  If your map is not
the
size of the window, and your pan, the popup will be visible outside the
main
map div.  IE 6/7 doesn't do this.

John

-----Original Message-----
From: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org]
On
Behalf Of Christopher Schmidt
Sent: Thursday, July 12, 2007 8:59 AM
To: Burgholzer,Robert
Cc: users at openlayers.org
Subject: Re: [OpenLayers-Users] Scrollbars in popup

On Thu, Jul 12, 2007 at 09:51:08AM -0400, Burgholzer,Robert wrote:
> I am trying to have popup text with scrollbars on my map. I have seen
> two posts regarding this in the archives, but found no resolutions.
Any
> help would be most appreciated.
> 
>  
> 
> I am new to OpenLayers and think it is really fantastic.

FlickrBrowse does this. THe code is in
http://labs.metacarta.com/flickrbrowse/Flickr.js -- 
            popup.contentDiv.style.overflow='auto';

I have no idea if this is supported or not.            

Regards,
-- 
Christopher Schmidt
MetaCarta
_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they are
addressed. If you have received this email in error please notify the
sender. This message contains confidential information and is intended
only for the individual named. If you are not the named addressee you
should not disseminate, distribute or copy this e-mail.



More information about the Users mailing list