Skip to content
This repository has been archived by the owner on May 6, 2021. It is now read-only.

Print plugin issue with layouts with a name longer than 2 chars #740

Open
offtherailz opened this issue Oct 5, 2015 · 1 comment
Open
Labels

Comments

@offtherailz
Copy link
Member

The layout selector, on change event, split the old layout removing the first 2 chars from the old layout id to create the new id. It works with layouts like A3, A4 and so on, but fails for layouts like LETTER, 11x17 ....

e.g.
A4_2_pages_with_legend --> LETTER_2_pages_with_legend works LETTER_2_pages_with_legend --> ``A4TTER_2_pages_with_legend fails.

references:
https://github.com/geosolutions-it/MapStore/blob/master/mapcomposer/app/static/externals/GeoExt/lib/GeoExt/plugins/PrintProviderField.js#L122

https://github.com/geosolutions-it/MapStore/blob/master/mapcomposer/app/static/externals/PrintPreview/lib/GeoExt.ux/PrintPreview.js#L537

These should be replaced with something like :

         if(currentLayout.indexOf('_2_pages_compact_legend') > 0){
            var index = currentLayout.indexOf('_2_pages_compact_legend');
            currentLayout = currentLayout.substr(0,index);
        } else if(currentLayout.indexOf('_compact_legend') > 0){
            var index = currentLayout.indexOf('_compact_legend');
            currentLayout = currentLayout.substr(0,index);
        } else if(currentLayout.indexOf('_2_pages_legend') > 0){
            var index = currentLayout.indexOf('_2_pages_legend');
            currentLayout = currentLayout.substr(0,index);
        }
@Gnafu
Copy link
Contributor

Gnafu commented Oct 9, 2015

This issues is still open because the fix ( 6e0f967 ) must be ported on the master branch

@Gnafu Gnafu unassigned mricca Oct 9, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants