Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop-down box not wide enough for layers #201

Open
jonathan-wcc opened this issue Jul 17, 2013 · 6 comments
Open

Drop-down box not wide enough for layers #201

jonathan-wcc opened this issue Jul 17, 2013 · 6 comments

Comments

@jonathan-wcc
Copy link

The drop-down box that contains a list of layers isn't wide enough to show the entire layer description. This is a problem because I have two layers with almost the same name but that is different at the end. See attached.

clipboard01

@ahocevar
Copy link
Contributor

You should se the full layer name on hover.

@jonathan-wcc
Copy link
Author

Sorry, just tried it but can't see any. No tooltip or anything. Is this implementation specific?

@ahocevar
Copy link
Contributor

Your code should have a line

Ext.QuickTips.init();

Then it should work out of the box.

@justb4
Copy link
Contributor

justb4 commented Jul 18, 2013

This was already as the very first line of code in the App init (this is the App Jonathan is using via Heron), which autocreates all components, including GXP's:
(Heron.layout contains a component definition tree with xtypes etc):

  Heron.App = function() {

  return {
    create : function() {
        Ext.QuickTips.init();

        if (Heron.layout.renderTo || Heron.layout.xtype == 'window') {
            // Render topComponent into a page div element or floating window
            Heron.App.topComponent = Ext.create(Heron.layout);
        } else {
            // Default: render top component into an ExtJS ViewPort (full screen)
            Heron.App.topComponent = new Ext.Viewport({
                id  :"hr-topComponent",
                layout: "fit",
                hideBorders: true,

                // This creates the entire layout from the config !
                items: [Heron.layout]
            });
        }
    },

It is a bit vague what happens in the Ext.form.ComboBox from which the LayerCombo is derived. There are issues with listWidth, especially when box population is dynamic. See e.g.
https://www.google.nl/search?q=extjs+combobox+width+problem
and
http://stackoverflow.com/questions/1459221/extjs-ext-combobox-autosize-over-existing-content

For other layer dropdowns Heron uses a LayerCombo class with special code for the resizing problem.
This took quite some time to figure out:
https://code.google.com/p/geoext-viewer/source/browse/trunk/heron/lib/widgets/LayerCombo.js
Maybe this is of help.

@ahocevar
Copy link
Contributor

Ah right, I see now that the qtip for combo entries is used in the Add Layers dialog, but not in the layers combo of the QueryPanel: https://github.com/opengeo/gxp/blob/master/src/script/plugins/AddLayers.js#L496.

A pull request to add this to the QueryPanel would be gladly accepted.

@jonathan-wcc
Copy link
Author

You two seem to have it in hand, but a further observation - most of the drop-down boxes are of suitable width, there's only two that aren't, at least in Heron:

The layer-list in QueryBuilder, and the the operator list in QueryBuilder - you can see the later on the opengeo demo when using the "between" operator - http://suite.opengeo.org/geoexplorer/composer/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants