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 @@
<label>Opacité &nbsp;<span>(%)</span></label>
<div class="range-container">
<input
v-model="form.opacity"
type="range"
min="0"
max="1"
v-model="form.opacity"
step="0.01"
>
<output class="range-output-bubble">
......@@ -83,8 +83,8 @@ export default {
default: 'circle'
},
initOpacity: {
type: Number,
default: 1
type: String,
default: '1'
},
geomType: {
type: String,
......
......@@ -50,6 +50,7 @@
v-if="feature_type"
:init-color="feature_type.color"
:init-icon="feature_type.icon"
:init-opacity="feature_type.opacity"
:geom-type="feature_type.geom_type"
@set="setDefaultStyle"
/>
......@@ -98,6 +99,7 @@
feature_type.colors_style.value.icons[option] :
null
"
:init-opacity="feature_type.colors_style.opacity"
:geom-type="feature_type.customfield_set.geomType"
@set="setColorsStyle"
/>
......@@ -253,17 +255,25 @@ export default {
},
setDefaultStyle(e) {
const value = e.value;
this.form.color = value.color.value;
this.form.icon = value.icon;
const { color, icon, opacity } = e.value;
console.log({ color, icon, opacity });
console.log('this.form', this.form);
this.form.color = color.value;
this.form.icon = icon;
this.form.opacity = opacity;
},
setColorsStyle(e) {
const { name, value } = e;
this.form.colors_style.colors[name] = value.color;
this.form.colors_style.icons[name] = value.icon;
this.form.colors_style.value.colors[name] = value.color;
this.form.colors_style.value.icons[name] = value.icon;
const { color, icon, opacity } = value;
console.log({ color, icon, opacity });
console.log(this.form.colors_style.colors);
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() {
......
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