From 0431d40d5e62a3eea50b35691065e369289cbc66 Mon Sep 17 00:00:00 2001 From: BingBlog Date: Mon, 15 Jan 2018 23:11:30 +0800 Subject: [PATCH] frontend fix fitscreen, download (#149) --- frontend/src/graph/Graph.san | 13 +++++++++++++ frontend/src/graph/ui/chart.san | 10 ---------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/frontend/src/graph/Graph.san b/frontend/src/graph/Graph.san index fc48a648..8f782622 100644 --- a/frontend/src/graph/Graph.san +++ b/frontend/src/graph/Graph.san @@ -46,6 +46,19 @@ export default { attached() { autoAdjustHeight(); + }, + + handleFitScreen() { + this.data.set('filtScreen', { + filtScreen: true + }); + this.data.set('config.scale', 0.5); + }, + + handleDownload() { + this.data.set('download', { + filtScreen: true + }); } }; diff --git a/frontend/src/graph/ui/chart.san b/frontend/src/graph/ui/chart.san index 81ab22cc..9545d5d6 100644 --- a/frontend/src/graph/ui/chart.san +++ b/frontend/src/graph/ui/chart.san @@ -106,16 +106,6 @@ export default { // enable inertial throwing inertia: true, autoScroll: true, - restrict: { - restriction: 'parent', - endOnly: true, - elementRect: { - top: 0, - left: 0, - bottom: 1, - right: 1 - } - }, // call this function on every dragmove event onmove(event) { dragMovelHandler(event, (target, x, y) => { -- GitLab