This commit is contained in:
schmelczerandras 2019-08-25 15:49:51 +02:00
commit e992152a75
4 changed files with 289 additions and 79 deletions

View file

@ -37,11 +37,12 @@ $slider-size: 40px;
transition: box-shadow $long-animation-time, transform $long-animation-time;
&:hover {
box-shadow: $shadow;
transform: translateY(-$slider-size / 2 + $line-height / 2) scale(1.1);
@media (min-width: $mobile-width) {
&:hover {
box-shadow: $shadow;
transform: translateY(-$slider-size / 2 + $line-height / 2) scale(1.1);
}
}
cursor: pointer;
position: relative;

View file

@ -16,6 +16,12 @@ export class DoubleSliderComponent {
this._values = values;
this.calculateLabels();
if (this._oneValue > this._otherValue) {
this._oneValue = this.MAX - 1;
} else {
this._otherValue = this.MAX - 1;
}
this.emitValue();
}

View file

@ -98,8 +98,10 @@ $inner-padding: var(--medium-padding);
}
&:hover {
.background {
box-shadow: $shadow;
@media (min-width: $mobile-width) {
.background {
box-shadow: $shadow;
}
}
}

View file

@ -1,4 +1,5 @@
import { Component, Input, Output, EventEmitter, ViewChild, ElementRef } from '@angular/core';
import { CancelService } from '../../../services/cancel.service';
@Component({
selector: 'app-select-add',
@ -28,6 +29,12 @@ export class SelectAddComponent {
newOption: string;
isOpen = false;
constructor(private cancelService: CancelService) {
this.cancelService.subscribe(this, () => {
this.isOpen = false;
});
}
get otherOptions(): string[] {
return this.options.filter(a => a !== this.selected);
}