Method: Faa::Cleanup#fix_layout
- Defined in:
- lib/faa/cleanup.rb
#fix_layout ⇒ Object
Fix the layout by setting up proper viewports and plot configuration
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/faa/cleanup.rb', line 91 def fix_layout ps = paper_space ps. layout = paper_space_layout active_layout = layout layout.copy_plot_configuration pdf_plot_config block = add_title_block(scale: 1.0, layout: layout) if block # to do add it to layer puts "added title block" end # Use layout.add_pviewport which calculates size based on paper size and margins pv = layout.(:scale_to_fit) unless pv active_layout = layout end app.zoom_extents regen layout.update(plot_type: :layout) end |