From 35a331f3fd102e01f9e9ca931f914f6e1710a22a Mon Sep 17 00:00:00 2001 From: David Hudson Date: Mon, 5 Sep 2016 17:02:04 +0900 Subject: [PATCH] [Frontend] Fix plot image cutoff on export The images were being cutoff due to the "top" attribute of .gl-plot not changing when the buttons were hidden. The buttons are now hidden by CSS class rather than ng-show, which makes updating the .gl-plot top attribute easier. --- .../commonUI/general/res/sass/plots/_plots-main.scss | 10 ++++++++++ platform/features/plot/res/templates/plot.html | 5 +++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/platform/commonUI/general/res/sass/plots/_plots-main.scss b/platform/commonUI/general/res/sass/plots/_plots-main.scss index 12f148c0d9..8fda639bea 100644 --- a/platform/commonUI/general/res/sass/plots/_plots-main.scss +++ b/platform/commonUI/general/res/sass/plots/_plots-main.scss @@ -43,6 +43,16 @@ top: $btnExportH + $interiorMargin; } } + &.hide-l-btn-set { + .s-button.t-export { + @include trans-prop-nice(opacity, 0ms, 0ms); + opacity: 0; + } + .gl-plot { + @include trans-prop-nice(top, $dur: 0ms); + top: 0; + } + } } .gl-plot { diff --git a/platform/features/plot/res/templates/plot.html b/platform/features/plot/res/templates/plot.html index dc230bcfa9..ac4fb0c388 100644 --- a/platform/features/plot/res/templates/plot.html +++ b/platform/features/plot/res/templates/plot.html @@ -20,8 +20,9 @@ at runtime from the About dialog for additional information. --> - + class="abs holder holder-plot" + ng-class="{'hide-l-btn-set': plot.hideExportButtons}"> +