Skip to content
Snippets Groups Projects
Commit e717b8ed authored by Timothee P's avatar Timothee P :sunflower:
Browse files

retrieve opacity from request

parent fd50aa7e
No related branches found
No related tags found
No related merge requests found
...@@ -18,10 +18,10 @@ ...@@ -18,10 +18,10 @@
<label>Opacité &nbsp;<span>(%)</span></label> <label>Opacité &nbsp;<span>(%)</span></label>
<div class="range-container"> <div class="range-container">
<input <input
v-model="form.opacity"
type="range" type="range"
min="0" min="0"
max="1" max="1"
v-model="form.opacity"
step="0.01" step="0.01"
> >
<output class="range-output-bubble"> <output class="range-output-bubble">
...@@ -83,8 +83,8 @@ export default { ...@@ -83,8 +83,8 @@ export default {
default: 'circle' default: 'circle'
}, },
initOpacity: { initOpacity: {
type: Number, type: String,
default: 1 default: '1'
}, },
geomType: { geomType: {
type: String, type: String,
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
v-if="feature_type" v-if="feature_type"
:init-color="feature_type.color" :init-color="feature_type.color"
:init-icon="feature_type.icon" :init-icon="feature_type.icon"
:init-opacity="feature_type.opacity"
:geom-type="feature_type.geom_type" :geom-type="feature_type.geom_type"
@set="setDefaultStyle" @set="setDefaultStyle"
/> />
...@@ -98,6 +99,7 @@ ...@@ -98,6 +99,7 @@
feature_type.colors_style.value.icons[option] : feature_type.colors_style.value.icons[option] :
null null
" "
:init-opacity="feature_type.colors_style.opacity"
:geom-type="feature_type.customfield_set.geomType" :geom-type="feature_type.customfield_set.geomType"
@set="setColorsStyle" @set="setColorsStyle"
/> />
...@@ -253,17 +255,25 @@ export default { ...@@ -253,17 +255,25 @@ export default {
}, },
setDefaultStyle(e) { setDefaultStyle(e) {
const value = e.value; const { color, icon, opacity } = e.value;
this.form.color = value.color.value; console.log({ color, icon, opacity });
this.form.icon = value.icon; console.log('this.form', this.form);
this.form.color = color.value;
this.form.icon = icon;
this.form.opacity = opacity;
}, },
setColorsStyle(e) { setColorsStyle(e) {
const { name, value } = e; const { name, value } = e;
this.form.colors_style.colors[name] = value.color; const { color, icon, opacity } = value;
this.form.colors_style.icons[name] = value.icon; console.log({ color, icon, opacity });
this.form.colors_style.value.colors[name] = value.color; console.log(this.form.colors_style.colors);
this.form.colors_style.value.icons[name] = value.icon; console.log(this.form.colors_style.colors[name]);
this.form.colors_style.colors[name] = color;
this.form.colors_style.icons[name] = icon;
//this.form.colors_style.icons[name] = icon;
this.form.colors_style.value.colors[name] = color;
this.form.colors_style.value.icons[name] = icon;
}, },
sendFeatureSymbology() { sendFeatureSymbology() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment