Skip to content

Commit 25f3166

Browse files
committed
Fixed PlotViewer styling
1 parent 66342e5 commit 25f3166

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

webapp/components/general/PlotViewer.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import React from 'react';
22
import ReactResizeDetector from 'react-resize-detector';
33
import HTMLViewer from './HTMLViewer';
4-
54
const PlotViewer = ({ key, id, method }) => {
65
const data = window.plotCache[id];
7-
86
if (method.plotMethod.startsWith('iplot')) {
97
return (
108
<ReactResizeDetector>
@@ -13,16 +11,21 @@ const PlotViewer = ({ key, id, method }) => {
1311
width: '100%',
1412
height: '100%',
1513
textAlign: 'center',
14+
position: 'absolute',
15+
top: '0px',
16+
left: '0px'
1617
}}
1718
>
1819
<iframe
1920
title="plot"
20-
scrolling="no"
21-
name="dipole"
21+
name="plotViewer"
2222
srcDoc={data}
2323
style={{
24-
overflowX:'hidden',
25-
overflowY:'hidden',
24+
position: 'absolute',
25+
overflowX:'yes',
26+
overflowY:'yes',
27+
top: '0px',
28+
left: '0px',
2629
border: 0,
2730
width: '100%',
2831
height: '100%',
@@ -38,5 +41,4 @@ const PlotViewer = ({ key, id, method }) => {
3841
</ReactResizeDetector>
3942
);
4043
};
41-
4244
export default PlotViewer;

0 commit comments

Comments
 (0)