Skip to content

Commit 9855c02

Browse files
authored
Update script.js
1 parent 12cce9c commit 9855c02

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

resources/script.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,17 @@ function beginSequentialMode() {
2424

2525
function drawLayout() {
2626
if (screen.width > 768 || window.orientation == -90 || window.orientation == 90)
27-
drawHorizontalLayout();
27+
setTimeout(function() {
28+
drawHorizontalLayout();
29+
drawPoints();
30+
setSVGPaths();
31+
}, 250);
2832
else
29-
drawVerticalLayout();
30-
drawPoints();
31-
setSVGPaths();
33+
setTimeout(function() {
34+
drawVerticalLayout();
35+
drawPoints();
36+
setSVGPaths();
37+
}, 250);
3238
}
3339

3440
function drawHorizontalLayout() {
@@ -38,7 +44,6 @@ function drawHorizontalLayout() {
3844
document.getElementById('phone_container').style.left = '0px';
3945
textContainer.style.left = phoneFrame.offsetWidth + 30 + "px";
4046
textContainer.style.top = '15%';
41-
document.body.style.backgroundColor = "red";
4247
}
4348

4449
function drawVerticalLayout() {
@@ -49,7 +54,6 @@ function drawVerticalLayout() {
4954
phoneContainer.style.left = (window.innerWidth - phoneFrame.offsetWidth) / 2 + 'px';
5055
phoneContainer.style.bottom = '0px';
5156
textContainer.style.left = textContainer.style.top = '5%';
52-
document.body.style.backgroundColor = "yellow";
5357
}
5458

5559
function drawPoints() {

0 commit comments

Comments
 (0)