Skip to content

Commit

Permalink
fix(hammer-configs): Add Injectable DatePicker/TimePicker HammerConfi…
Browse files Browse the repository at this point in the history
…gs. #3011
  • Loading branch information
HristoP96 authored and HristoP96 committed Nov 26, 2018
1 parent f5f025b commit 59aed5e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import {
OnInit,
Output,
QueryList,
ViewChildren
ViewChildren,
Injectable
} from '@angular/core';
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
import { HAMMER_GESTURE_CONFIG, HammerGestureConfig } from '@angular/platform-browser';
Expand Down Expand Up @@ -38,6 +39,7 @@ export enum CalendarSelection {
RANGE = 'range'
}

@Injectable()
export class CalendarHammerConfig extends HammerGestureConfig {
public overrides = {
pan: { direction: Hammer.DIRECTION_VERTICAL, threshold: 1 }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ export class IgxDatePickerComponent implements ControlValueAccessor, EditorProvi
@Output()
public onSelection = new EventEmitter<Date>();

/*
/**
* @hidden
*/
@ViewChild('defaultDatePickerTemplate', { read: TemplateRef })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ import {
ViewChild,
AfterViewInit,
DoCheck,
ContentChild
ContentChild,
Injectable
} from '@angular/core';
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
import { HAMMER_GESTURE_CONFIG, HammerGestureConfig } from '@angular/platform-browser';
Expand All @@ -36,6 +37,7 @@ import { EditorProvider } from '../core/edit-provider';
import { IgxTimePickerBase, IGX_TIME_PICKER_COMPONENT } from './time-picker.common';

let NEXT_ID = 0;
@Injectable()
export class TimePickerHammerConfig extends HammerGestureConfig {
public overrides = {
pan: { direction: Hammer.DIRECTION_VERTICAL, threshold: 1 }
Expand Down

0 comments on commit 59aed5e

Please sign in to comment.