Skip to content

Commit 3b79e66

Browse files
sculoveTaihoon Kim
authored andcommitted
chore(doc): improve documents
* docs(eg): correct document * docs(class,Component): correct description * docs(flicking): correct description * docs(infiniteGrid): correct infiniteGrid * docs(movableCoord): correct description * docs(visible,jQueryPlugin): correct description ref #366
1 parent ceff22d commit 3b79e66

File tree

12 files changed

+421
-448
lines changed

12 files changed

+421
-448
lines changed

src/class.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ eg.module("class", [eg], function(ns) {
88

99
/**
1010
*
11-
* The Class object is used to implement object-oriented style programming
11+
* A module used to implement an application in object-oriented programming style
1212
* @group egjs
13-
* @ko Class는 어플리케이션을 객체지향 프로그래밍 방식으로 구현하는데 사용한다.
13+
* @ko 애플리케이션을 객체지향 프로그래밍 방식으로 구현할 때 사용하는 모듈
1414
* @class
1515
* @name eg.Class
1616
*
1717
* @support {"ie": "7+", "ch" : "latest", "ff" : "latest", "sf" : "latest", "edge" : "latest", "ios" : "7+", "an" : "2.1+ (except 3.x)"}
18-
* @param {Object} def Class definition of object literal type. <ko>Class 정의부로 Object 의 <a href="https://en.wikipedia.org/wiki/Literal_(computer_programming)">리터럴 규칙</a>을 따른다. 단, "construct" 는 생성자 함수를 위해 예약된 키 값이다. </ko>
19-
* @param {Function} def.construct constructor of class. <ko>Class 생성자 함수 (Optional)</ko>
18+
* @param {Object} def definition. Follow the rules under <a href="https://en.wikipedia.org/wiki/Literal_(computer_programming)">Literals of objects</a>. Note that "construct" is a key reserved as a constructor function. <ko>클래스를 정의하는 부분. <a href="https://en.wikipedia.org/wiki/Literal_(computer_programming)">객체 리터럴 규칙</a>을 따른다. 단, 'construct'는 생성자 함수로 예약된 키다</ko>
19+
* @param {Function} [def.construct] The constructor of the class <ko>클래스 생성자 함수 (Optional)</ko>
2020
*
2121
* @example
2222
var Some = eg.Class({
@@ -42,10 +42,10 @@ eg.module("class", [eg], function(ns) {
4242
typeClass.prototype = def;
4343

4444
/**
45-
* Retrun instance itself.
46-
* @ko 자신의 인스턴스를 반환한다.
45+
* Returns an instance of a class itself.
46+
* @ko 클래스 자신의 인스턴스를 반환한다.
4747
* @method eg.Class#instance
48-
* @return {eg.Class} instance of itself<ko>자신의 인스턴스</ko>
48+
* @return {eg.Class} An instance of a class itself<ko>클래스 자신의 인스턴스</ko>
4949
*/
5050
typeClass.prototype.instance = function() {
5151
return this;
@@ -55,14 +55,14 @@ eg.module("class", [eg], function(ns) {
5555
return typeClass;
5656
};
5757
/**
58-
* Extends class
59-
* @ko extend는 Class를 상속할 때 사용한다.
58+
* Extends a class.
59+
* @ko 클래스를 상속한다.
6060
* @static
6161
* @method eg.Class.extend
62-
* @param {eg.Class} oSuperClass Super class. <ko>상속하려는 Class</ko>
63-
* @param {Object} def Class definition of object literal type. <ko>Class 정의부로 Object 의 <a href="https://en.wikipedia.org/wiki/Literal_(computer_programming)">리터럴 규칙</a>을 따른다. 단, "construct" 는 생성자 함수를 위해 예약된 키 값이다.</ko>
64-
* @param {Function} def.construct <ko>Class 생성자 함수 (Optional)</ko>
65-
* @return {eg.Class} instance of new eg.Class <ko>새로 생성된 Class 인스턴스</ko>
62+
* @param {eg.Class} oSuperClass Superclass <ko>상속하려는 클래스</ko>
63+
* @param {Object} def Class definition. Follow the rules under <a href="https://en.wikipedia.org/wiki/Literal_(computer_programming)">Literals of objects</a>. Note that "construct" is a key reserved as a constructor function. <ko>클래스를 정의하는 부분. <a href="https://en.wikipedia.org/wiki/Literal_(computer_programming)">객체 리터럴 규칙</a>을 따른다. 단, 'construct'는 생성자 함수로 예약된 키다.</ko>
64+
* @param {Function} [def.construct] The constructor of the class <ko>클래스 생성자 함수 (Optional)</ko>
65+
* @return {eg.Class} An instance of a new class <ko>새로 생성된 클래스의 인스턴스</ko>
6666
* @example
6767
var Some = eg.Class.extend(eg.Component,{
6868
"some" : function(){}

src/component.js

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ eg.module("component", [eg], function(ns) {
77
"use strict";
88

99
/**
10-
* Component
10+
* A class used to manage events and options in a component
1111
* @class
1212
* @group egjs
1313
* @name eg.Component
14-
* @ko 컴포넌트를 만들 때 이벤트와 옵션을 관리할 수 있도록 도와주는 클래스이다.
14+
* @ko 컴포넌트의 이벤트와 옵션을 관리할 수 있게 하는 클래스
1515
*
1616
* @support {"ie": "7+", "ch" : "latest", "ff" : "latest", "sf" : "latest", "edge" : "latest", "ios" : "7+", "an" : "2.1+ (except 3.x)"}
1717
*/
@@ -23,12 +23,12 @@ eg.module("component", [eg], function(ns) {
2323
this.options = {};
2424
},
2525
/**
26-
* Get or set option.
27-
* @ko 옵션을 관리한다.
26+
* Sets options in a component or returns them.
27+
* @ko 컴포넌트에 옵션을 설정하거나 옵션을 반환한다
2828
* @method eg.Component#option
29-
* @param {String} key
30-
* @param {Object} [value]
31-
* @return {eg.Component|Object} (set)instance of itself or (get)option value <ko>옵션을 설정할 경우 인스턴스 자신을 반환하며, 옵션 값을 요청한 경우 해당 key에 저장된 값을 반환한다.</ko>
29+
* @param {String} key The key of the option<ko>옵션의 키</ko>
30+
* @param {Object} [value] The option value that corresponds to a given key <ko>키에 해당하는 옵션값</ko>
31+
* @return {eg.Component|Object} An instance, an option value, or an option object of a component itself.<br>- If both key and value are used to set an option, it returns an instance of a component itself.<br>- If only a key is specified for the parameter, it returns the option value corresponding to a given key.<br>- If nothing is specified, it returns an option object. <ko>컴포넌트 자신의 인스턴스나 옵션값, 옵션 객체.<br>- 키와 값으로 옵션을 설정하면 컴포넌트 자신의 인스턴스를 반환한다.<br>- 파라미터에 키만 설정하면 키에 해당하는 옵션값을 반환한다.<br>- 파라미터에 아무것도 설정하지 않으면 옵션 객체를 반환한다.</ko>
3232
* @example
3333
var Some = eg.Class.extend(eg.Component);
3434
var some = new Some({
@@ -65,12 +65,12 @@ eg.module("component", [eg], function(ns) {
6565
return this;
6666
},
6767
/**
68-
* Trigger custom event.
69-
* @ko 커스텀 이벤트를 발생시킨다.
68+
* Triggers a custom event.
69+
* @ko 커스텀 이벤트를 발생시킨다
7070
* @method eg.Component#trigger
71-
* @param {String} eventName
72-
* @param {Object} customEvent
73-
* @return {Boolean}
71+
* @param {String} eventName The name of the custom event to be triggered <ko>발생할 커스텀 이벤트의 이름</ko>
72+
* @param {Object} customEvent Event data to be sent when triggering a custom event <ko>커스텀 이벤트가 발생할 때 전달할 데이터</ko>
73+
* @return {Boolean} Indicates whether the event has occurred. If the stop() method is called by a custom event handler, it will return false and prevent the event from occurring. <ko>이벤트 발생 여부. 커스텀 이벤트 핸들러에서 stop() 메서드를 호출하면 'false'를 반환하고 이벤트 발생을 중단한다.</ko>
7474
* @example
7575
var Some = eg.Class.extend(eg.Component,{
7676
"some": function(){
@@ -113,11 +113,11 @@ eg.module("component", [eg], function(ns) {
113113
return !isCanceled;
114114
},
115115
/**
116-
* Check whether the event has been registered in component.
117-
* @ko 컴포넌트에 이벤트 등록 여부를 확인한다.
116+
* Checks whether an event has been attached to a component.
117+
* @ko 컴포넌트에 이벤트가 등록됐는지 확인한다.
118118
* @method eg.Component#hasOn
119-
* @param {String} eventName
120-
* @return {Boolean}
119+
* @param {String} eventName The name of the event to be attached <ko>등록 여부를 확인할 이벤트의 이름</ko>
120+
* @return {Boolean} Indicates whether the event is attached. <ko>이벤트 등록 여부</ko>
121121
* @example
122122
var Some = eg.Class.extend(eg.Component,{
123123
"some": function(){
@@ -129,12 +129,12 @@ eg.module("component", [eg], function(ns) {
129129
return !!this.eventHandler[eventName];
130130
},
131131
/**
132-
* Attach an event handler function.
133-
* @ko 이벤트를 등록한다.
132+
* Attaches an event to a component.
133+
* @ko 컴포넌트에 이벤트를 등록한다.
134134
* @method eg.Component#on
135-
* @param {eventName} eventName
136-
* @param {Function} handlerToAttach
137-
* @return {eg.Component} instance of itself<ko>자신의 인스턴스</ko>
135+
* @param {eventName} eventName The name of the event to be attached <ko>등록할 이벤트의 이름</ko>
136+
* @param {Function} handlerToAttach The handler function of the event to be attached <ko>등록할 이벤트의 핸들러 함수</ko>
137+
* @return {eg.Component} An instance of a component itself<ko>컴포넌트 자신의 인스턴스</ko>
138138
* @example
139139
var Some = eg.Class.extend(eg.Component,{
140140
"hi": function(){},
@@ -166,12 +166,12 @@ eg.module("component", [eg], function(ns) {
166166
return this;
167167
},
168168
/**
169-
* Detach an event handler function.
170-
* @ko 이벤트를 해제한다.
169+
* Detaches an event from the component.
170+
* @ko 컴포넌트에 등록된 이벤트를 해제한다
171171
* @method eg.Component#off
172-
* @param {eventName} eventName
173-
* @param {Function} handlerToDetach
174-
* @return {eg.Component} instance of itself<ko>자신의 인스턴스</ko>
172+
* @param {eventName} eventName The name of the event to be detached <ko>해제할 이벤트의 이름</ko>
173+
* @param {Function} handlerToDetach The handler function of the event to be detached <ko>해제할 이벤트의 핸들러 함수</ko>
174+
* @return {eg.Component} An instance of a component itself <ko>컴포넌트 자신의 인스턴스</ko>
175175
* @example
176176
var Some = eg.Class.extend(eg.Component,{
177177
"hi": function(){},

src/customEvent/rotate.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ eg.module("rotate", ["jQuery", eg, window, document], function($, ns, global, do
1313
* @group jQuery Extension
1414
*/
1515
/**
16-
* Add rotate event support in jQuery
16+
* This jQuery custom event is fired when device rotates.
1717
*
18-
* @ko 기기가 회전할 때 발생하는 jQuery의 커스텀 이벤트(rotate)이다.
18+
* @ko 기기가 회전할 때 발생하는 jQuery 커스텀 이벤트
1919
* @name jQuery#rotate
2020
* @event
21-
* @param {Event} e
22-
* @param {Object} info
23-
* @param {Boolean} info.isVertical vertical <ko>수직여부</ko>
21+
* @param {Event} e The Event object in jQuery<ko>jQuery의 Event 객체</ko>
22+
* @param {Object} info The object of data to be sent when the event is fired<ko>이벤트가 발생할 때 전달되는 데이터 객체</ko>
23+
* @param {Boolean} info.isVertical The orientation of the device (true: portrait, false: landscape) <ko>기기의 화면 방향(true: 수직 방향, false: 수평 방향)</ko>
2424
* @support { "ios" : "7+", "an" : "2.1+ (except 3.x)"}
2525
* @example
2626
* $(window).on("rotate",function(e, info){
@@ -175,10 +175,10 @@ eg.module("rotate", ["jQuery", eg, window, document], function($, ns, global, do
175175
};
176176

177177
/**
178-
* Check if device is in portrait mode
179-
* @ko 화면이 수직방향(portrait 모드)일 경우 true 를 반환한다.
178+
* Checks whether the current orientation of the device is portrait.
179+
* @ko 기기의 화면이 수직 방향인지 확인한다
180180
* @method eg#isPortrait
181-
* @return {Boolean}
181+
* @return {Boolean} The orientation of the device (true: portrait, false: landscape) <ko>기기의 화면 방향(true: 수직 방향, false: 수평 방향)</ko>
182182
* @example
183183
eg.isPortrait(); // Check if device is in portrait mode
184184
*/

src/customEvent/scrollEnd.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ eg.module("scrollEnd", ["jQuery", eg, window], function($, ns, global) {
99

1010
// jscs:eable maximumLineLength
1111
/**
12-
* A jQuery custom event for "scrollEnd". It triggered when end of scrolling the page.
13-
* @ko "scrollEnd" "scrollEnd" jQuery custom 이벤트. 스크롤이 끝날 때 발생한다.
12+
* A custom event in jQuery occurs when scroll ends.
13+
* @ko 스크롤이 끝날 때 발생하는 jQuery 커스텀 이벤트
1414
* @name jQuery#scrollEnd
1515
* @event
16-
* @param {Event} e
17-
* @param {Object} info
18-
* @param {Number} info.top The number of pixels that the document has already been scrolled vertically.<ko>문서의 세로 스크롤 px</ko>
19-
* @param {Number} info.left The number of pixels that the document has already been scrolled horizontally.<ko>문서의 가로 스크롤 px</ko>
16+
* @param {Event} e The Event object in jQuery <ko>jQuery의 Event 객체</ko>
17+
* @param {Object} info The object of data to be sent when the event is fired<ko>이벤트가 발생할 때 전달되는 데이터 객체</ko>
18+
* @param {Number} info.top The size of the vertical scroll pane (unit: px)<ko>세로 스크롤 영역의 크기(단위: px)</ko>
19+
* @param {Number} info.left The size of horizontal scroll pane (unit: px)<ko>가로 스크롤 영역의 크기(단위: px)</ko>
2020
* @support {"ie": "9+", "ch" : "latest", "ff" : "latest", "sf" : "latest", "edge" : "latest", "ios" : "7+", "an" : "2.1+ (except 3.x)"}
2121
* @example
2222
* $(window).on("scrollend",function(e, info){

src/eg.js

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -57,23 +57,23 @@ eg.module("eg", ["jQuery", eg, window, eg.Agent], function($, ns, global, Agent)
5757

5858
/**
5959
* @name eg.VERSION
60-
* @description A string containing the egjs version number.
60+
* @description The version numbers of egjs.
6161
* @ko egjs 버전
6262
*/
6363
ns.VERSION = "#__VERSION__#";
6464
ns.hook = {};
6565
/**
66-
* Get the value of user-agent information the browser.
67-
* @ko 브라우저의 user-agent 정보를 반환한다.
66+
* Returns the User-Agent information
67+
* @ko user-agent 정보를 반환한다.
6868
* @method eg#agent
6969
* @return {Object} agent
70-
* @return {Object} agent.os os infomation <ko>os 정보</ko>
71-
* @return {String} agent.os.name os name (android, ios, window, mac) <ko>os 이름 (android, ios, window, mac)</ko>
72-
* @return {String} agent.os.version os version <ko>os 버전</ko>
73-
* @return {String} agent.browser browser information <ko>브라우저 정보</ko>
74-
* @return {String} agent.browser.name browser name (default, safari, chrome, sbrowser, ie, firefox) <ko>브라우저 이름 (default, safari, chrome, sbrowser, ie, firefox)</ko>
75-
* @return {String} agent.browser.version browser version <ko>브라우저 버전 </ko>
76-
* @return {String} agent.browser.webview check to see if the browser is a webview<ko>웹뷰 브라우저 여부</ko>
70+
* @return {Object} agent.os os Operating system information <ko>운영체제 정보</ko>
71+
* @return {String} agent.os.name Operating system name (android, ios, window, mac) <ko>운영체제 이름 (android, ios, window, mac)</ko>
72+
* @return {String} agent.os.version Operating system version <ko>운영체제 버전</ko>
73+
* @return {String} agent.browser Browser information <ko>브라우저 정보</ko>
74+
* @return {String} agent.browser.name Browser name (default, safari, chrome, sbrowser, ie, firefox) <ko>브라우저 이름 (default, safari, chrome, sbrowser, ie, firefox)</ko>
75+
* @return {String} agent.browser.version Browser version <ko>브라우저 버전 </ko>
76+
* @return {String} agent.browser.webview Indicates whether a WebView browser is available<ko>웹뷰 브라우저 여부</ko>
7777
* @example
7878
eg.agent();
7979
// {
@@ -100,14 +100,14 @@ if(agent.os.name === "naver") {
100100
};
101101

102102
/**
103-
* Get the string containing css 'translate' syntax.
103+
* Returns the syntax of the translate style which is applied to CSS transition properties.
104104
*
105-
* @ko CSS translate 구문을 반환한다.
105+
* @ko CSS 트랜지션 속성에 적용할 translate 스타일 구문을 반환한다
106106
* @method eg#translate
107-
* @param {String} x x-axis <ko>x축</ko>
108-
* @param {String} y y-axis <ko>y축</ko>
109-
* @param {Boolean} [isHA] isHWAccelerable <ko>하드웨어 가속 여부</ko>
110-
* @return {String}
107+
* @param {String} x Distance to move along the X axis <ko>x축을 따라 이동할 거리</ko>
108+
* @param {String} y Distance to move along the Y axis <ko>y축을 따라 이동할 거리</ko>
109+
* @param {Boolean} [isHA] Force hardware acceleration <ko>하드웨어 가속 사용 여부</ko>
110+
* @return {String} Syntax of the translate style <ko>translate 스타일 구문</ko>
111111
* @example
112112
eg.translate('10px', '200%'); // translate(10px,200%);
113113
eg.translate('10px', '200%', true); // translate3d(10px,200%,0);
@@ -120,11 +120,11 @@ eg.translate('10px', '200%', true); // translate3d(10px,200%,0);
120120
};
121121

122122
/**
123-
* Check to see if the hardware acceleration is suitable to use.
123+
* Checks whether hardware acceleration is enabled.
124124
*
125-
* @ko 하드웨어 가속을 사용하는 것이 적합한지 확인한다.
125+
* @ko 하드웨어 가속을 사용할 수 있는 환경인지 확인한다
126126
* @method eg#isHWAccelerable
127-
* @return {Boolean}
127+
* @return {Boolean} Indicates whether hardware acceleration is enabled. <ko>하드웨어 가속 사용 가능 여부</ko>
128128
* @example
129129
eg.isHWAccelerable(); // Returns 'true' when hardware acceleration is supported
130130
@@ -168,11 +168,11 @@ return defaultVal;
168168
};
169169

170170
/**
171-
* Check to see CSS transition is suitable to use.
171+
* Checks whether CSS transition properties can be used.
172172
*
173-
* @ko CSS transtion을 사용하는 것이 적합한지 확인한다.
173+
* @ko CSS 트랜지션 속성을 사용할 수 있는 환경인지 확인한다.
174174
* @method eg#isTransitional
175-
* @return {Boolean}
175+
* @return {Boolean} Indicates whether CSS transition properties can be used. <ko>CSS 트랜지션 속성 사용 가능 여부</ko>
176176
* @example
177177
eg.isTransitional(); // Returns 'true' when CSS transition is supported.
178178
@@ -225,11 +225,11 @@ return defaultVal;
225225
};
226226

227227
/**
228-
* The polyfill for 'requestAnimationFrame'
229-
* @ko requestAnimationFrame 폴리필
228+
* A polyfill for the window.requestAnimationFrame() method.
229+
* @ko window.requestAnimationFrame() 메서드의 polyfill 함수다
230230
* @method eg#requestAnimationFrame
231-
* @param {Function} timer function
232-
* @return {Number} key
231+
* @param {Function} timer The function returned through a call to the requestAnimationFrame() method <ko>requestAnimationFrame() 메서드가 호출할 함수</ko>
232+
* @return {Number} ID of the requestAnimationFrame() method. <ko>requestAnimationFrame() 메서드의 아이디</ko>
233233
* @example
234234
var timerId = eg.requestAnimationFrame(function() {
235235
console.log("call");
@@ -240,10 +240,10 @@ return defaultVal;
240240
return raf(fp);
241241
};
242242
/**
243-
* The polyfill for 'cancelAnimationFrame'
244-
* @ko cancelAnimationFrame 폴리필
243+
* A polyfill for the window.cancelAnimationFrame() method. It cancels an animation executed through a call to the requestAnimationFrame() method.
244+
* @ko window.cancelAnimationFrame() 메서드의 polyfill 함수다. requestAnimationFrame() 메서드로 실행한 애니메이션을 중단한다
245245
* @method eg#cancelAnimationFrame
246-
* @param {Number} key
246+
* @param {Number} key − The ID value returned through a call to the requestAnimationFrame() method. <ko>requestAnimationFrame() 메서드가 반환한 아이디 값</ko>
247247
* @example
248248
eg.cancelAnimationFrame(timerId);
249249
* @see https://developer.mozilla.org/en-US/docs/Web/API/Window/cancelAnimationFrame

0 commit comments

Comments
 (0)