Skip to content

Commit b64ac2c

Browse files
[콜백] 과제 번역
1 parent 35714c0 commit b64ac2c

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

1-js/11-async/01-callbacks/01-animate-circle-callback/solution.view/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222

2323
<body>
2424

25-
<button onclick="go()">Click me</button>
25+
<button onclick="go()">여기를 클릭해 주세요.</button>
2626

2727
<script>
2828

2929
function go() {
3030
showCircle(150, 150, 100, div => {
3131
div.classList.add('message-ball');
32-
div.append("Hello, world!");
32+
div.append("안녕하세요!");
3333
});
3434
}
3535

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11

2-
# Animated circle with callback
2+
# 콜백을 이용한 움직이는 원
33

4-
In the task <info:task/animate-circle> an animated growing circle is shown.
4+
앞서 과제 <info:task/animate-circle> 에서 점점 커지는 원을 만들어 보았습니다.
55

6-
Now let's say we need not just a circle, but to show a message inside it. The message should appear *after* the animation is complete (the circle is fully grown), otherwise it would look ugly.
6+
이젠 점점 커지는 원뿐만 아니라 원 안에 메시지를 보여줘야 한다고 가정해봅시다. 이때 메시지는 애니메이션이 다 끝나고 난 **, 즉 원이 완전히 커지고 난 후에 나타나야 합니다. 그렇지 않으면 뭔가 이상해 보이기 때문입니다.
77

8-
In the solution of the task, the function `showCircle(cx, cy, radius)` draws the circle, but gives no way to track when it's ready.
8+
과제 <info:task/animate-circle>의 해답에 있는 함수 `showCircle(cx, cy, radius)`은 원을 그려주긴 하지만, 애니메이션이 다 끝났는지 아닌지를 알려주는 기능은 없습니다.
99

10-
Add a callback argument: `showCircle(cx, cy, radius, callback)` to be called when the animation is complete. The `callback` should receive the circle `<div>` as an argument.
10+
함수 `showCircle``showCircle(cx, cy, radius, callback)`처럼 콜백 인수를 추가해 애니메이션이 종료되면 이 콜백이 실행되도록 해봅시다. 단, 이때 `callback`은 원에 대응하는 `<div>`를 반드시 인수로 받아야 합니다.
1111

12-
Here's the example:
12+
완성된 함수는 다음과 같이 사용할 수 있어야 합니다.
1313

1414
```js
1515
showCircle(150, 150, 100, div => {
1616
div.classList.add('message-ball');
17-
div.append("Hello, world!");
17+
div.append("안녕하세요!");
1818
});
1919
```
2020

21-
Demo:
21+
데모:
2222

2323
[iframe src="solution" height=260]
2424

25-
Take the solution of the task <info:task/animate-circle> as the base.
25+
<info:task/animate-circle>의 해답을 기초 삼아 새로운 함수를 만들어보세요.

0 commit comments

Comments
 (0)