• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

naver / egjs-flicking / 10557177632

26 Aug 2024 09:22AM UTC coverage: 38.327% (-44.5%) from 82.855%
10557177632

Pull #886

github

daybrush
fix: recalculate camera offset
Pull Request #886: fix: recalculate camera offset

2039 of 7372 branches covered (27.66%)

Branch coverage included in aggregate %.

11 of 29 new or added lines in 2 files covered. (37.93%)

5575 existing lines in 46 files now uncovered.

5099 of 11252 relevant lines covered (45.32%)

10.91 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

63.64
/src/const/error.ts
1
/*
1✔
2
 * Copyright (c) 2015 NAVER Corp.
3
 * egjs projects are licensed under the MIT license
4
 */
5
/* eslint-disable @typescript-eslint/restrict-template-expressions */
6

7
/**
1✔
8
 * Error codes of {@link FlickingError}. Below are the conditions where each error code occurs.
1✔
9
 * @ko {@link FlickingError}의 에러 코드. 아래는 각각의 에러 코드가 발생하는 조건입니다.
10
 * @name ERROR_CODE
11
 * @constant
12
 * @type object
13
 * @property {number} WRONG_TYPE Parameter type is wrong<ko>패러미터의 타입이 잘못되었을 경우</ko>
14
 * @property {number} ELEMENT_NOT_FOUND Element is not found inside page with the given CSS selector<ko>주어진 CSS selector로 페이지 내에서 해당 엘리먼트를 찾지 못했을 경우</ko>
15
 * @property {number} VAL_MUST_NOT_NULL Expected non-null value, but given `null` or `undefined`<ko>값을 기대했으나, `null`이나 `undefined`를 받은 경우</ko>
16
 * @property {number} NOT_ATTACHED_TO_FLICKING When Flicking's component is not initialized (i.e. {@link Flicking#init} is not called)<ko>Flicking 내부 컴포넌트가 초기화되지 않은 경우 ({@link Flicking#init}이 호출되지 않은 경우)</ko>
17
 * @property {number} WRONG_OPTION One of the options is wrong<ko>옵션들 중 잘못된 값이 있을 때</ko>
18
 * @property {number} INDEX_OUT_OF_RANGE When the given index is out of possible range<ko>인덱스가 주어진 범위를 벗어난 경우</ko>
19
 * @property {number} POSITION_NOT_REACHABLE When {@link Control#moveToPosition}'s position parameter is out of possible range.<ko>{@link Control#moveToPosition}의 `position` 패러미터가 도달 가능한 범위를 벗어난 경우</ko>
20
 * @property {number} TRANSFORM_NOT_SUPPORTED CSS `transform` property is not available(<=IE8) <ko>CSS `transform` 속성을 사용할 수 없는 경우(<=IE8)</ko>
21
 * @property {number} STOP_CALLED_BY_USER When the event's `stop()` is called by user.<ko>사용자에 의해 이벤트의 `stop()`이 호출된 경우</ko>
22
 * @property {number} ANIMATION_INTERRUPTED When the animation is interrupted by user.<ko>사용자에 의해 애니메이션이 중단된 경우</ko>
23
 * @property {number} ANIMATION_ALREADY_PLAYING When the animation is already playing.<ko>현재 애니메이션이 이미 진행중인 경우</ko>
24
 * @property {number} NOT_ALLOWED_IN_FRAMEWORK When the non-allowed method is called from frameworks (React, Angular, Vue...)
25
 * <ko>프레임워크(React, Angular, Vue ...)에서 사용 불가능한 메소드를 호출했을 경우</ko>
26
 * @property {number} NOT_INITIALIZED When the {@link Flicking#init} is not called before but is needed<ko>{@link Flicking#init}의 호출이 필요하나, 아직 호출되지 않았을 경우</ko>
27
 * @property {number} NO_ACTIVE When there're no active panel that flicking has selected. This may be due to the absence of any panels<ko>현재 Flicking이 선택한 패널이 없을 경우. 일반적으로 패널이 하나도 없는 경우에 발생할 수 있습니다</ko>
28
 * @property {number} NOT_ALLOWED_IN_VIRTUAL When the non-allowed method is called while the virtual option is enabled<ko>virtual 옵션이 활성화된 상태에서 사용 불가능한 메소드가 호출되었을 경우</ko>
29
 */
30
export const CODE = {
5✔
31
  WRONG_TYPE: 0,
32
  ELEMENT_NOT_FOUND: 1,
1✔
33
  VAL_MUST_NOT_NULL: 2,
34
  NOT_ATTACHED_TO_FLICKING: 3,
35
  WRONG_OPTION: 4,
36
  INDEX_OUT_OF_RANGE: 5,
37
  POSITION_NOT_REACHABLE: 6,
38
  TRANSFORM_NOT_SUPPORTED: 7,
39
  STOP_CALLED_BY_USER: 8,
40
  ANIMATION_INTERRUPTED: 9,
41
  ANIMATION_ALREADY_PLAYING: 10,
42
  NOT_ALLOWED_IN_FRAMEWORK: 11,
43
  NOT_INITIALIZED: 12,
44
  NO_ACTIVE: 13,
45
  NOT_ALLOWED_IN_VIRTUAL: 14
46
} as const;
47

48
export const MESSAGE = {
5✔
49
  WRONG_TYPE: (wrongVal: any, correctTypes: string[]) => `${wrongVal}(${typeof wrongVal}) is not a ${correctTypes.map(type => `"${type}"`).join(" or ")}.`,
1✔
UNCOV
50
  ELEMENT_NOT_FOUND: (selector: string) => `Element with selector "${selector}" not found.`,
×
UNCOV
51
  VAL_MUST_NOT_NULL: (val: any, name: string) => `${name} should be provided. Given: ${val}`,
×
52
  NOT_ATTACHED_TO_FLICKING: "This module is not attached to the Flicking instance. \"init()\" should be called first.",
53
  WRONG_OPTION: (optionName: string, val: any) => `Option "${optionName}" is not in correct format, given: ${val}`,
UNCOV
54
  INDEX_OUT_OF_RANGE: (val: number, min: number, max: number) => `Index "${val}" is out of range: should be between ${min} and ${max}.`,
×
UNCOV
55
  POSITION_NOT_REACHABLE: (position: number) => `Position "${position}" is not reachable.`,
×
56
  TRANSFORM_NOT_SUPPORTED: "Browser does not support CSS transform.",
57
  STOP_CALLED_BY_USER: "Event stop() is called by user.",
58
  ANIMATION_INTERRUPTED: "Animation is interrupted by user input.",
59
  ANIMATION_ALREADY_PLAYING: "Animation is already playing.",
60
  NOT_ALLOWED_IN_FRAMEWORK: "This behavior is not allowed in the frameworks like React, Vue, or Angular.",
61
  NOT_INITIALIZED: "Flicking is not initialized yet, call init() first.",
62
  NO_ACTIVE: "There's no active panel that Flicking has selected. This may be due to the absence of any panels.",
63
  NOT_ALLOWED_IN_VIRTUAL: "This behavior is not allowed when the virtual option is enabled"
64
} as const;
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc