Skip to content

Commit a53de85

Browse files
authored
Update script.js
1 parent c0a3f4f commit a53de85

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

resources/script.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,15 @@ function drawLayout() {
3434
}
3535

3636
function drawHorizontalLayout() {
37-
var phoneFrame = document.getElementById('phone_frame');
38-
phoneFrame.style.height = window.innerHeight + 'px';
39-
phoneFrame.style.left = '0px';
37+
document.getElementById('phone_frame').height = window.innerHeight + 'px';
38+
document.getElementById('phone_container').style.left = '0px';
4039
document.getElementById('text_container').style.left = phoneFrame.offsetWidth + 30 + "px";
4140
}
4241

4342
function drawVerticalLayout() {
4443
var phoneFrame = document.getElementById('phone_frame');
4544
phoneFrame.style.height = Math.floor(0.6*window.innerHeight) + 'px';
46-
phoneFrame.style.left = (window.innerWidth - phoneFrame.offsetWidth) / 2 + 'px';
45+
document.getElementById('phone_container').style.left = (window.innerWidth - phoneFrame.offsetWidth) / 2 + 'px';
4746
document.getElementById('text_container').style.left = "5%";
4847
}
4948

0 commit comments

Comments
 (0)