ScorecardBarDirective class

Private directive that catches the scorecard bar element of the scoreboard.

The directive's role is to handle scrolling within the scoreboard. It provides convenience methods, such as for scrolling left and right, along with computations for determining how far to scroll.

The rule for scrolling is that the scoreboard will try to scroll such that for any card currently partially covered by a scroll button, it will then finish the scroll with that card's border flush to the client edge. For example, assume that a user clicks on the scroll right button. The scoreboard will then scroll such that the card currently visible (and furthest to the right) will then be the leftmost card after scrolling is done. The reason for this is to make sure that as a user scrolls through the cards, each cards will at one point be fully visible to the user. If we did not take this precaution, then in some situations, some cards will always be partially covered by the scroll buttons, regardless of how the user scrolled.

Annotations
  • @Directive(selector: '[scorecardBar]')

Constructors

ScorecardBarDirective(DomService _domService, HtmlElement _element, @Optional() @Inject(rtlToken) bool? isRtl)

Properties

atEnd bool
Whether the scoreboard is at its end scroll state.
no setter
atStart bool
Whether the scoreboard is at its starting scroll state.
no setter
currentButtonSize int
Returns the size of the current buttons
no setter
currentClientSize int
The current size of the client.
no setter
currentScrollSize int
The current size of the scrollbar.
no setter
currentTransformSize int
Get the current transform of scorecard bar in pixels.
no setter
hashCode int
The hash code for this object.
no setterinherited
isScrollable bool
Whether the scoreboard is in a scrollable state.
no setter
isVertical ← dynamic
Whether the scrollbar is aligned vertically.
no getter
nearEnd bool
Whether the scoreboard will reach its ending scroll state in at most one forwards movement.
no setter
nearStart bool
Whether the scoreboard will reach its starting scroll state in at most one backwards movement.
no setter
refreshStream Stream<bool>
Stream to indicate when the scoreboard arrows should be refreshed.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
transformAxis String
The axis upon which transforms should occur.
no setter

Methods

ngAfterViewChecked() → void
ngOnDestroy() → void
Executed before the directive is removed from the DOM and destroyed.
ngOnInit() → void
Executed after the first change detection run for a directive.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reset() → void
Resets the scoreboard to its initial scroll state.
scrollBack() → void
Scroll the scoreboard back.
scrollForward() → void
Scroll the scoreboard forward.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited