mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Improve printing of tables, fix printing of charts, add a browser test.
Summary: - Include column headers on each page for printing tables. - Avoid page-breaks inside rows or cards of a card-list. - Fix printing of charts that did not show up at all before. - Add a browser test, not great, but somewhat functional. Test Plan: New test, plus tested manually. Column headers work on Chrome and Firefox (not Safari). Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D2636
This commit is contained in:
@@ -7,6 +7,7 @@ import {fromKoSave} from 'app/client/lib/fromKoSave';
|
||||
import {loadPlotly, PlotlyType} from 'app/client/lib/imports';
|
||||
import * as DataTableModel from 'app/client/models/DataTableModel';
|
||||
import {ViewFieldRec, ViewSectionRec} from 'app/client/models/DocModel';
|
||||
import {reportError} from 'app/client/models/errors';
|
||||
import {KoSaveableObservable, ObjObservable} from 'app/client/models/modelUtil';
|
||||
import {SortedRowSet} from 'app/client/models/rowset';
|
||||
import {cssRow} from 'app/client/ui/RightPanel';
|
||||
@@ -131,6 +132,10 @@ export class ChartView extends Disposable {
|
||||
this.autoDispose(this.sortedRows.getKoArray().subscribe(this._update));
|
||||
}
|
||||
|
||||
public prepareToPrint(onOff: boolean) {
|
||||
Plotly.relayout(this._chartDom, {}).catch(reportError);
|
||||
}
|
||||
|
||||
protected onTableLoaded() {
|
||||
(BaseView.prototype as any).onTableLoaded.call(this);
|
||||
this._update();
|
||||
|
||||
Reference in New Issue
Block a user