Skip to content

Commit 1c1ea98

Browse files
committed
👌 unimplement canvas stretching behavior
1 parent 30c47d6 commit 1c1ea98

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

client/modules/IDE/components/PreviewFrame.jsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -200,11 +200,6 @@ class PreviewFrame extends React.Component {
200200
this.addLoopProtect(sketchDoc);
201201
sketchDoc.head.insertBefore(consoleErrorsScript, sketchDoc.head.firstElement);
202202

203-
if (this.props.forceFullWidth) {
204-
const resizeScript = sketchDoc.createElement('style');
205-
resizeScript.innerHTML = '.p5Canvas { width: 100% !important; height: auto !important }';
206-
sketchDoc.head.appendChild(resizeScript);
207-
}
208203

209204
return `<!DOCTYPE HTML>\n${sketchDoc.documentElement.outerHTML}`;
210205
}
@@ -389,13 +384,11 @@ PreviewFrame.propTypes = {
389384
clearConsole: PropTypes.func.isRequired,
390385
cmController: PropTypes.shape({
391386
getContent: PropTypes.func
392-
}),
393-
forceFullWidth: PropTypes.bool
387+
})
394388
};
395389

396390
PreviewFrame.defaultProps = {
397391
fullView: false,
398-
forceFullWidth: false,
399392
cmController: {}
400393
};
401394

client/modules/Mobile/MobileSketchView.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ const MobileSketchView = (props) => {
6767
content={selectedFile.content}
6868

6969
isPlaying
70-
forceFullWidth
7170
isAccessibleOutputPlaying={ide.isAccessibleOutputPlaying}
7271
previewIsRefreshing={ide.previewIsRefreshing}
7372

0 commit comments

Comments
 (0)