Skip to content

Commit

Permalink
Make height of csv textarea more dynamic
Browse files Browse the repository at this point in the history
  • Loading branch information
jieter committed Apr 21, 2016
1 parent 3fa2b9b commit cceb365
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion site/bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ <h1 class="col-lg-offset-5 col-sm-offset-6 col-sm-6 col-xs-10" id="name">
<div class="col-lg-offset-5 col-sm-offset-6 col-sm-6">
<label>
<input type="checkbox" id="extended-csv" />
Render extended CSV table (including beat and run angles)
Generate extended CSV (including beat and run angles)
</label>
</div>
</div>
Expand Down
8 changes: 7 additions & 1 deletion site/polarplot.css
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,16 @@ input { margin-bottom: 2px; }

#meta textarea {
width: 100%;
height: 500px;
height: 160px;
font-family: monospace;
font-size: 10px;
}
#meta textarea.plot-only {
height: 600px;
}
#meta textarea.csv-extended {
height: 380px;
}

.polar-table {
font-size: 12px;
Expand Down
2 changes: 1 addition & 1 deletion site/src/meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = function render_metadata (boat, extended) {
['offshore TN', boat.rating.triple_offshore.join(', ')],
['inshore TN', boat.rating.triple_inshore.join(', ')],
'<div class="table-container"></table>',
['polar (csv)', '<textarea>' + polarcsv(boat, extended) + '</textarea>', 'polar']
['polar (csv)', '<textarea class="' + (extended ? 'csv-extended' : '') + '">' + polarcsv(boat, extended) + '</textarea>', 'polar']
]).enter().append('div').attr('class', 'meta-item');

meta.selectAll('.meta-item').html(function (d) {
Expand Down

0 comments on commit cceb365

Please sign in to comment.