[Users] hiding the printExtent... one more question

Andreas Hocevar ahocevar at opengeo.org
Wed Jul 21 15:40:23 CEST 2010


Hi Marc,

thanks for helping us with the API review (even if you don't know you are doing so :-) ).

You could try to create the MapPanel without the PrintExtent plugin, and call init() on the PrintExtent plugin when you first need it. This should work, although init() is not an API method, nor is it the standard way to add a plugin.

A better way would indeed be to make the initial state configurable, e.g. by adding a hidden property. If set to true, the plugin would initialize without calling setUp (show). What do you think?

Some background on the history of the PrintExtent plugin:

Initially, the PrintExtent was a component, not a plugin (see http://trac.geoext.org/attachment/ticket/204/geoext-204.3.patch). Eric led the efforts to make it a plugin. See http://atlas.openplans.org/~georj/cgi-bin/log.cgi/geoext/2010/02/08/#T11:13:01Z for the whole conversation between him and myself.

Especially this part is interesting:
 13:12:04Z elemoine: we're also telling the user PrintExtent is a Component, so he'd assume show/hide could be called
 13:12:15Z ahocevar: right, but that we could fix. technically.
 13:12:32Z ahocevar: by overriding hide() and show()

So with #307, we would add hide and show, something that people would expect from a component :-).

Regards,
Andreas.

On Jul 21, 2010, at 13:58 , Marc Jansen wrote:

> Hi list,
> 
> For the record: https://trac.geoext.org/ticket/307 is the ticket with 
> the renamed methods.
> 
> One additional question came to my mind:
> 
> If a PrintExtent plugin is added to a mappanel, its setUp()-method is 
> automatically called from the init()-method, which in my case lead to 
> the behaviour, that the PrintExtent was visible on the map, but the 
> accordion element with the print-form was hidden.
> 
> Should this (the autimatic rendering) be configurable in any way? Or am 
> I doing things the wrong way?
> 
> Thanks again for your help,
> 
> Regards,
> Marc
> 
> 
> 
> 
> On 21.07.2010 11:32, Antoine Abt wrote:
>> Hi,
>> 
>> On 21 July 2010 11:21, Andreas Hocevar<ahocevar at opengeo.org>  wrote:
>> 
>>> Hi,
>>> 
>>> I'd say tearDown() is the right thing to do. I would propose to change two method names as part of our API review before the 1.0 release:
>>> 
>> Yep, you get the example in the simple print widgets, to deal with
>> accordion (and others):
>> 
>> http://trac.geoext.org/browser/extensions/geoext.ux/ux/SimplePrint/lib/GeoExt.ux/SimplePrint.js?rev=1877#L133
>> 
>> Regards,
>> 
>> 
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users



-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.



More information about the Users mailing list