👌 unimplement canvas stretching behavior

This commit is contained in:
ghalestrilo 2020-06-30 17:01:24 -03:00
parent 30c47d6fe5
commit 1c1ea98a0b
2 changed files with 1 additions and 9 deletions

View File

@ -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 `<!DOCTYPE HTML>\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: {}
};

View File

@ -67,7 +67,6 @@ const MobileSketchView = (props) => {
content={selectedFile.content}
isPlaying
forceFullWidth
isAccessibleOutputPlaying={ide.isAccessibleOutputPlaying}
previewIsRefreshing={ide.previewIsRefreshing}