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

naver / egjs-flicking / 4550193631

pending completion
4550193631

Pull #794

github

GitHub
Merge f8b6de8d9 into 761aa929d
Pull Request #794: docs: fix misspelled path in document

4448 of 7210 branches covered (61.69%)

Branch coverage included in aggregate %.

8413 of 9000 relevant lines covered (93.48%)

142.07 hits per line

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

42.67
/src/control/states/DisabledState.ts
1
/*
1✔
2
 * Copyright (c) 2015 NAVER Corp.
1✔
3
 * egjs projects are licensed under the MIT license
1✔
4
 */
1!
5
import State, { STATE_TYPE } from "./State";
5✔
6

×
7
/**
1✔
8
 * A state that activates when Flicking is stopped by event's `stop` method
9
 * @ko 이벤트의 `stop`호출에 의해 Flicking이 정지된 상태
1✔
10
 * @internal
1!
11
 */
12
class DisabledState extends State {
6!
13
  /**
1✔
14
   * Whether user is clicking or touching
1!
15
   * @ko 현재 사용자가 클릭/터치중인지 여부
16
   * @type {false}
17
   * @readonly
1!
18
   */
×
19
  public readonly holding = false;
×
20
  /**
21
   * Whether Flicking's animating
×
22
   * @ko 현재 애니메이션 동작 여부
23
   * @type {true}
24
   * @readonly
1!
25
   */
26
  public readonly animating = true;
27

28
  public onAnimationEnd(ctx: Parameters<State["onAnimationEnd"]>[0]): void {
5✔
29
    const { transitTo } = ctx;
1✔
30

1!
31
    transitTo(STATE_TYPE.IDLE);
×
32
  }
×
33

34
  public onChange(ctx: Parameters<State["onChange"]>[0]): void {
5✔
35
    const { axesEvent, transitTo } = ctx;
36

1✔
37
    // Can stop Axes's change event
38
    axesEvent.stop();
39

40
    transitTo(STATE_TYPE.IDLE);
41
  }
1✔
42

43
  public onRelease(ctx: Parameters<State["onRelease"]>[0]): void {
5✔
44
    const { axesEvent, transitTo } = ctx;
45

46
    // This is needed when stopped hold start event
47
    if (axesEvent.delta.flick === 0) {
1!
48
      transitTo(STATE_TYPE.IDLE);
1✔
49
    }
50
  }
×
51
}
5✔
52

53
export default DisabledState;
5✔
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

© 2025 Coveralls, Inc