From 1c1ea98a0bdbe0f9bbff55d346cdf72d86948be8 Mon Sep 17 00:00:00 2001 From: ghalestrilo Date: Tue, 30 Jun 2020 17:01:24 -0300 Subject: [PATCH] :ok_hand: unimplement canvas stretching behavior --- client/modules/IDE/components/PreviewFrame.jsx | 9 +-------- client/modules/Mobile/MobileSketchView.jsx | 1 - 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/client/modules/IDE/components/PreviewFrame.jsx b/client/modules/IDE/components/PreviewFrame.jsx index b1867622..5046a4fe 100644 --- a/client/modules/IDE/components/PreviewFrame.jsx +++ b/client/modules/IDE/components/PreviewFrame.jsx @@ -200,11 +200,6 @@ class PreviewFrame extends React.Component { this.addLoopProtect(sketchDoc); sketchDoc.head.insertBefore(consoleErrorsScript, sketchDoc.head.firstElement); - if (this.props.forceFullWidth) { - const resizeScript = sketchDoc.createElement('style'); - resizeScript.innerHTML = '.p5Canvas { width: 100% !important; height: auto !important }'; - sketchDoc.head.appendChild(resizeScript); - } return `\n${sketchDoc.documentElement.outerHTML}`; } @@ -389,13 +384,11 @@ PreviewFrame.propTypes = { clearConsole: PropTypes.func.isRequired, cmController: PropTypes.shape({ getContent: PropTypes.func - }), - forceFullWidth: PropTypes.bool + }) }; PreviewFrame.defaultProps = { fullView: false, - forceFullWidth: false, cmController: {} }; diff --git a/client/modules/Mobile/MobileSketchView.jsx b/client/modules/Mobile/MobileSketchView.jsx index 49af2c2e..b871edf9 100644 --- a/client/modules/Mobile/MobileSketchView.jsx +++ b/client/modules/Mobile/MobileSketchView.jsx @@ -67,7 +67,6 @@ const MobileSketchView = (props) => { content={selectedFile.content} isPlaying - forceFullWidth isAccessibleOutputPlaying={ide.isAccessibleOutputPlaying} previewIsRefreshing={ide.previewIsRefreshing}