Skip to content

Commit

Permalink
fix: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Wendell committed Jan 22, 2019
1 parent aa6b428 commit 6620f68
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
1 change: 1 addition & 0 deletions components/core/util/number.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export function ensureNumberInRange(num: number, min: number, max: number): numb
if (isNaN(num) || num < min) {
return min;
} else if (num > max) {
console.log('captured max');
return max;
} else {
return num;
Expand Down
4 changes: 0 additions & 4 deletions components/slider/nz-slider-error.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
export function getValueTypeNotMatchError(): Error {
return new Error(`The "nzRange" can't match the "nzValue"'s type, please check these properties: "nzRange", "nzValue", "nzDefaultValue".`);
}

export function getValueTypeNotLegalError(): Error {
return new Error(``);
}
7 changes: 7 additions & 0 deletions components/slider/nz-slider.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ export class NzSliderComponent implements ControlValueAccessor, OnInit, OnChange
this.onTouched = fn;
}

setDisabledState(isDisabled: boolean): void {
this.nzDisabled = isDisabled;
this.toggleDragDisabled(isDisabled);
}

private setValue(value: SliderValue, isWriteValue: boolean = false): void {
if (isWriteValue) {
this.value = this.formatValue(value);
Expand Down Expand Up @@ -204,6 +209,8 @@ export class NzSliderComponent implements ControlValueAccessor, OnInit, OnChange
});
[ this.bounds.lower, this.bounds.upper ] = boundParts;
[ this.track.offset, this.track.length ] = trackParts;

this.cdr.markForCheck();
}

private onDragStart(value: number): void {
Expand Down
4 changes: 0 additions & 4 deletions components/slider/nz-slider.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,6 @@ describe('NzSlider', () => {
expect(onChangeSpy).toHaveBeenCalledTimes(1);
});

it('should pass un-covered code testing', () => {
expect(sliderInstance.getValueToOffset()).toBe(sliderInstance.value);
});

it('should always display tooltip work', () => {

});
Expand Down

0 comments on commit 6620f68

Please sign in to comment.