-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Etienne Dldc
committed
Nov 27, 2015
1 parent
ce9bda0
commit 0d3a2d3
Showing
30 changed files
with
435 additions
and
2,440 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<style lang="sass" scoped> | ||
.legend-elem{ | ||
h4{ | ||
font-family: 'cpcompanyregular', sans-serif; | ||
letter-spacing: 1px; | ||
color: #cdcdcd; | ||
} | ||
.legend-align{ | ||
} | ||
.legend-point{ | ||
display: inline-block; | ||
width: 12px; | ||
height: 12px; | ||
-moz-border-radius: 200px; | ||
-webkit-border-radius: 200px; | ||
border-radius: 200px; | ||
margin-right : 30px; | ||
} | ||
} | ||
</style> | ||
|
||
<template> | ||
<div class="legend-elem"> | ||
<h4>{{ params.name }}</h4> | ||
<div class="legend-align"> | ||
<input v-if="checkbox" type="checkbox" id="checkbox" v-model="params.display"> | ||
<span v-if="color" class="legend-point" :style="{ backgroundColor: params.colorLegend }"></span> | ||
<slider :slug="params.slug" :value="params.user_multiplier * 100" @slider-change="onSliderChange"></slider> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import $ from 'jquery'; | ||
import Slider from './Slider.vue'; | ||
export default { | ||
props: ['params'], | ||
data: () => { | ||
return { | ||
checkbox: true, | ||
color: true | ||
}; | ||
}, | ||
ready() { | ||
if (this.params.colorLegend == undefined) { this.color = false } | ||
if (this.params.display == undefined) { this.checkbox = false } | ||
this.$watch('params.display', function (newVal, oldVal) { | ||
this.$dispatch('params-update'); | ||
}); | ||
}, | ||
components: { | ||
Slider | ||
}, | ||
methods: { | ||
onSliderChange(name, value) { | ||
this.params.user_multiplier = value / 100; | ||
this.$dispatch('params-update'); | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<style lang="sass"> | ||
.slider{ | ||
//width: 200px; | ||
height: 30px; | ||
padding-top: 5px; | ||
} | ||
// noUiSlider | ||
.noUi-horizontal.noUi-custom { | ||
border: none; | ||
border-radius: 0px; | ||
height: 4px; | ||
margin-top: 10px; | ||
margin-bottom: 10px; | ||
background: #595959; | ||
box-shadow: none; | ||
.noUi-handle { | ||
border: none; | ||
border-radius: 0px; | ||
width: 10px; | ||
background: white; | ||
height: 28px; | ||
left: -5px; | ||
top: -12px; | ||
} | ||
.noUi-handle:before, .noUi-handle:after{ | ||
content: none; | ||
} | ||
.noUi-base { | ||
height: 24px; | ||
top: -10px; | ||
} | ||
.noUi-origin { | ||
background: #2c2c2c; | ||
border-radius: 0px; | ||
height: 4px; | ||
top: 10px; | ||
} | ||
} | ||
</style> | ||
|
||
<template> | ||
<div class="slider"> | ||
<div class="slider-range noUi-custom"></div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import $ from 'jquery'; | ||
import noUiSlider from 'nouislider'; | ||
export default { | ||
props: ['slug', 'value'], | ||
ready() { | ||
var rangeSlider = $(this.$el).find('.slider-range').get(0); | ||
noUiSlider.create(rangeSlider, { | ||
start: [ this.value ], | ||
range: { | ||
'min': [ 0 ], | ||
'max': [ 100 ] | ||
} | ||
}); | ||
rangeSlider.noUiSlider.on('change', ( value, handle ) => { | ||
this.value = value; | ||
this.$emit('slider-change', this.slug, parseFloat(value[0])); | ||
}); | ||
}, | ||
methods: { | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.