newsdev / ai2html

A script for Adobe Illustrator that converts your Illustrator artwork into an html page.
http://ai2html.org
Other
898 stars 146 forks source link

Resizer Script Incorrectly Included #45

Closed 1wheel closed 7 years ago

1wheel commented 7 years ago

This config block incorrectly includes the resizer script, even though include_resizer_css_jsis set to false:

    ai2html-settings
    settings_version: 0.60
    create_promo_image: yes
    project_name: ai2swiper
    image_format: jpg
    write_image_files: yes
    responsiveness: dynamic
    html_output_path: ../src/slides/
    image_output_path: ../../public/_assets/
    use_lazy_loader: no
    include_resizer_classes: no
    iinclude_resizer_css_js: no
    include_resizer_script: no
    include_resizer_widths: no
    max_width: 
    output: multiple-files
    png_number_of_colors: 128
    jpg_quality: 60
    show_completion_dialog_box: true
    last_updated_text: 
    headline: 
    leadin: 
    summary: 
    notes: 
    sources: 
    credit: By The New York Times
    page_template: nyt5-article-embed
    show_in_compatible_apps: yes
    display_for_promotion_only: false
    constrain_width_to_text_column: false

It looks like something is overriding included_resizer_css_js to yes:

image

Blanking out responsiveJS in script fixed the issue for this project, but that breaks all resizing:

    if (docSettings.include_resizer_script=="yes") {
        responsiveJs = '\t' + getResizerScript() + '\n';
        responsiveCss             = "";
    }
    responsiveJs        = "";

Moving the resizer settings to the end of the config also fix the issue:

    ai2html-settings
    settings_version: 0.60
    create_promo_image: yes
    project_name: ai2swiper
    image_format: jpg
    write_image_files: yes
    responsiveness: dynamic
    html_output_path: ../src/slides/
    image_output_path: ../../public/_assets/
    max_width: 
    output: multiple-files
    png_number_of_colors: 128
    jpg_quality: 60
    show_completion_dialog_box: true
    last_updated_text: 
    headline: 
    leadin: 
    summary: 
    notes: 
    sources: 
    credit: By The New York Times
    page_template: nyt5-article-embed
    show_in_compatible_apps: yes
    display_for_promotion_only: false
    constrain_width_to_text_column: false
    use_lazy_loader: no
    include_resizer_css_js: no
    include_resizer_classes: no
    include_resizer_widths: no
    include_resizer_script: no
mbloch commented 7 years ago

This is fixed in the current beta version, closing.