forked from DebaucheryLibrarian/traxxx
Added height and weight filters to actors overview.
This commit is contained in:
@@ -22,7 +22,8 @@
|
||||
:disabled="disabled"
|
||||
type="range"
|
||||
class="slider"
|
||||
@change="emit"
|
||||
@input="emit('input')"
|
||||
@change="emit('change')"
|
||||
@click.stop
|
||||
>
|
||||
|
||||
@@ -34,7 +35,8 @@
|
||||
:disabled="disabled"
|
||||
type="range"
|
||||
class="slider"
|
||||
@change="emit"
|
||||
@input="emit('input')"
|
||||
@change="emit('change')"
|
||||
@click.stop
|
||||
>
|
||||
</div>
|
||||
@@ -59,20 +61,20 @@ function maxValue() {
|
||||
}
|
||||
|
||||
function minPercentage() {
|
||||
return (this.minValue / this.max) * 100;
|
||||
return ((this.minValue - this.min) / (this.max - this.min)) * 100;
|
||||
}
|
||||
|
||||
function maxPercentage() {
|
||||
return (this.maxValue / this.max) * 100;
|
||||
return ((this.maxValue - this.min) / (this.max - this.min)) * 100;
|
||||
}
|
||||
|
||||
function emit() {
|
||||
function emit(type = 'change') {
|
||||
if (this.values) {
|
||||
this.$emit('change', [this.values[this.minValue], this.values[this.maxValue]]);
|
||||
this.$emit(type, [this.values[this.minValue], this.values[this.maxValue]]);
|
||||
return;
|
||||
}
|
||||
|
||||
this.$emit('change', [this.minValue, this.maxValue]);
|
||||
this.$emit(type, [this.minValue, this.maxValue]);
|
||||
}
|
||||
|
||||
function setNearest(event) {
|
||||
@@ -115,7 +117,7 @@ export default {
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
emits: ['change'],
|
||||
emits: ['change', 'input'],
|
||||
data() {
|
||||
if (this.values) {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user