Fix Cursor pointer & input Focus
This commit is contained in:
@@ -6,6 +6,8 @@ import Slider from "@/app_modules_thermo/components/slider.vue";
|
||||
@Component({name:"scheda",components: { slider:Slider} })
|
||||
export default class Scheda extends Vue{
|
||||
|
||||
@Prop({})
|
||||
id:string;
|
||||
@Prop({})
|
||||
portata:Recipe.IValue;
|
||||
@Prop({})
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<template v-if="portata.status.visible">
|
||||
<div class="input-area">
|
||||
<label>{{portata.key | localize(portata.key)}}</label>
|
||||
<numeric v-model="portata" />
|
||||
<numeric v-model="portata" :id="id" />
|
||||
</div>
|
||||
<slider v-model="portata"></slider>
|
||||
</template>
|
||||
|
||||
@@ -27,7 +27,19 @@ export default class SVGChart extends Vue {
|
||||
@Prop({ default: null })
|
||||
maxY: number;
|
||||
|
||||
step: number = 50;
|
||||
step: number = 50;
|
||||
|
||||
@Prop({ default: function () { return [] } })
|
||||
ids: string[]
|
||||
|
||||
click(idx){
|
||||
if(idx > this.ids.length -1 )
|
||||
return
|
||||
var elem = document.getElementById(this.ids[idx]);
|
||||
if(elem){
|
||||
elem.focus();
|
||||
}
|
||||
}
|
||||
|
||||
startXOf(barindex: number) {
|
||||
return this.bars.slice(0, barindex).reduce((p, c) => c.width + p, 0);
|
||||
|
||||
@@ -82,6 +82,8 @@
|
||||
:fill="b.backgroundColor"
|
||||
:stroke="b.borderColor"
|
||||
stroke-width="6"
|
||||
@click="click(idx)"
|
||||
class="pointer"
|
||||
/>
|
||||
|
||||
<line
|
||||
@@ -100,6 +102,9 @@
|
||||
.chart {
|
||||
overflow: hidden;
|
||||
}
|
||||
.pointer {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.chart svg {
|
||||
width: 100%;
|
||||
|
||||
+4
@@ -36,16 +36,19 @@
|
||||
class="box-500 mb-10"
|
||||
:portata="recipe.upperplate_air_1_chart_setpointy"
|
||||
:durata="recipe.upperplate_air_1_chart_setpointx"
|
||||
id="upperplate_air_1_chart_setpointy"
|
||||
></scheda>
|
||||
<scheda
|
||||
class="box-500 mb-10 color_2"
|
||||
:portata="recipe.upperplate_air_2_chart_setpointy"
|
||||
:durata="recipe.upperplate_air_2_chart_setpointx"
|
||||
id="upperplate_air_2_chart_setpointy"
|
||||
></scheda>
|
||||
<scheda
|
||||
class="box-500 mb-10 color_3"
|
||||
:portata="recipe.upperplate_air_3_chart_setpointy"
|
||||
:durata="recipe.upperplate_air_3_chart_setpointx"
|
||||
id="upperplate_air_3_chart_setpointy"
|
||||
></scheda>
|
||||
</article>
|
||||
<article>
|
||||
@@ -54,6 +57,7 @@
|
||||
:bars="bars"
|
||||
:lines="lines"
|
||||
:unitx="'s'"
|
||||
:ids="['upperplate_air_1_chart_setpointy','upperplate_air_2_chart_setpointy','upperplate_air_3_chart_setpointy']"
|
||||
:max-y="Math.max(recipe.upperplate_air_1_chart_setpointy.range.max , recipe.upperplate_air_2_chart_setpointy.range.max ,recipe.upperplate_air_3_chart_setpointy.range.max)"
|
||||
:max-x="Math.max(recipe.upperplate_air_1_chart_setpointx.setpointHMI+ recipe.upperplate_air_2_chart_setpointx.setpointHMI+recipe.upperplate_air_3_chart_setpointx.setpointHMI, recipe.upperplate_air_max_time.setpointHMI)"
|
||||
></svg-chart>
|
||||
|
||||
+2
@@ -36,12 +36,14 @@
|
||||
class="box-500 color_3"
|
||||
:portata="recipe.upperplate_extraction_1_chart_setpointy"
|
||||
:durata="recipe.upperplate_extraction_1_chart_setpointx"
|
||||
id="upperplate_extraction_1_chart_setpointy"
|
||||
></scheda>
|
||||
</article>
|
||||
<article>
|
||||
<svg-chart
|
||||
line-bar-color="#848484"
|
||||
:bars="bars"
|
||||
:ids="['upperplate_extraction_1_chart_setpointy']"
|
||||
:max-y="recipe.upperplate_extraction_1_chart_setpointy.range.max"
|
||||
:max-x="recipe.upperplate_extraction_1_chart_setpointx.range.max"
|
||||
></svg-chart>
|
||||
|
||||
+4
@@ -36,16 +36,19 @@
|
||||
class="box-500 mb-10"
|
||||
:portata="recipe.upperplate_vacuum_1_chart_setpointy"
|
||||
:durata="recipe.upperplate_vacuum_1_chart_setpointx"
|
||||
id="upperplate_vacuum_1_chart_setpointy"
|
||||
></scheda>
|
||||
<scheda
|
||||
class="box-500 mb-10 color_2"
|
||||
:portata="recipe.upperplate_vacuum_2_chart_setpointy"
|
||||
:durata="recipe.upperplate_vacuum_2_chart_setpointx"
|
||||
id="upperplate_vacuum_2_chart_setpointy"
|
||||
></scheda>
|
||||
<scheda
|
||||
class="box-500 mb-10 color_3"
|
||||
:portata="recipe.upperplate_vacuum_3_chart_setpointy"
|
||||
:durata="recipe.upperplate_vacuum_3_chart_setpointx"
|
||||
id="upperplate_vacuum_3_chart_setpointy"
|
||||
></scheda>
|
||||
</article>
|
||||
<article>
|
||||
@@ -53,6 +56,7 @@
|
||||
line-bar-color="#848484"
|
||||
:bars="bars"
|
||||
:lines="lines"
|
||||
:ids="['upperplate_vacuum_1_chart_setpointy','upperplate_vacuum_2_chart_setpointy','upperplate_vacuum_3_chart_setpointy']"
|
||||
:max-y="Math.max(recipe.upperplate_vacuum_1_chart_setpointy.range.max, recipe.upperplate_vacuum_2_chart_setpointy.range.max,recipe.upperplate_vacuum_3_chart_setpointy.range.max)"
|
||||
:max-x="Math.max(recipe.upperplate_vacuum_1_chart_setpointx.setpointHMI +recipe.upperplate_vacuum_2_chart_setpointx.setpointHMI +recipe.upperplate_vacuum_3_chart_setpointx.setpointHMI,recipe.upperplate_vacuum_max_time.setpointHMI)"
|
||||
></svg-chart>
|
||||
|
||||
+2
@@ -40,12 +40,14 @@
|
||||
class="box-500 color_3"
|
||||
:portata="recipe.extraction_main_1_chart_setpointy"
|
||||
:durata="recipe.extraction_main_1_chart_setpointx"
|
||||
id="extraction_main_1_chart_setpointy"
|
||||
></scheda>
|
||||
</article>
|
||||
<article>
|
||||
<svg-chart
|
||||
line-bar-color="#848484"
|
||||
:bars="bars"
|
||||
:ids="['extraction_main_1_chart_setpointy']"
|
||||
:max-y="recipe.extraction_main_1_chart_setpointy.range.max"
|
||||
:max-x="recipe.extraction_main_1_chart_setpointx.range.max"
|
||||
></svg-chart>
|
||||
|
||||
+2
@@ -36,12 +36,14 @@
|
||||
class="box-500 color_3"
|
||||
:portata="recipe.extraction_aux_1_chart_setpointy"
|
||||
:durata="recipe.extraction_aux_1_chart_setpointx"
|
||||
id="extraction_aux_1_chart_setpointy"
|
||||
></scheda>
|
||||
</article>
|
||||
<article>
|
||||
<svg-chart
|
||||
line-bar-color="#848484"
|
||||
:bars="bars"
|
||||
:ids="['extraction_aux_1_chart_setpointy']"
|
||||
:max-y="recipe.extraction_aux_1_chart_setpointy.range.max"
|
||||
:max-x="recipe.extraction_aux_1_chart_setpointx.range.max"
|
||||
></svg-chart>
|
||||
|
||||
@@ -71,12 +71,14 @@
|
||||
class="box-500 color_3"
|
||||
:portata="recipe.drawing_1_chart_setpointy"
|
||||
:durata="recipe.drawing_1_chart_setpointx"
|
||||
id="drawing_1_chart_setpointy"
|
||||
></scheda>
|
||||
</article>
|
||||
<article>
|
||||
<svg-chart
|
||||
line-bar-color="#848484"
|
||||
:bars="bars"
|
||||
:ids="['drawing_1_chart_setpointy']"
|
||||
:max-x="recipe.drawing_1_chart_setpointx.range.max"
|
||||
:max-y="recipe.drawing_1_chart_setpointy.range.max"
|
||||
></svg-chart>
|
||||
|
||||
@@ -28,16 +28,19 @@
|
||||
<article class="shrink ml-10">
|
||||
<scheda
|
||||
class="box-500 mb-10"
|
||||
id="vacuum_pre_1_chart_setpointy"
|
||||
:portata="recipe.vacuum_pre_1_chart_setpointy"
|
||||
:durata="recipe.vacuum_pre_1_chart_setpointx"
|
||||
></scheda>
|
||||
<scheda
|
||||
class="box-500 mb-10 color_2"
|
||||
id="vacuum_pre_2_chart_setpointy"
|
||||
:portata="recipe.vacuum_pre_2_chart_setpointy"
|
||||
:durata="recipe.vacuum_pre_2_chart_setpointx"
|
||||
></scheda>
|
||||
<scheda
|
||||
class="box-500 mb-10 color_3"
|
||||
id="vacuum_pre_3_chart_setpointy"
|
||||
:portata="recipe.vacuum_pre_3_chart_setpointy"
|
||||
:durata="recipe.vacuum_pre_3_chart_setpointx"
|
||||
></scheda>
|
||||
@@ -47,6 +50,7 @@
|
||||
line-bar-color="#848484"
|
||||
:bars="bars"
|
||||
:lines="lines"
|
||||
:ids="['vacuum_pre_1_chart_setpointy','vacuum_pre_2_chart_setpointy','vacuum_pre_3_chart_setpointy']"
|
||||
:max-y="Math.max(recipe.vacuum_pre_1_chart_setpointy.range.max , recipe.vacuum_pre_2_chart_setpointy.range.max ,recipe.vacuum_pre_3_chart_setpointy.range.max)"
|
||||
:max-x="Math.max(recipe.vacuum_pre_1_chart_setpointx.setpointHMI +recipe.vacuum_pre_2_chart_setpointx.setpointHMI+recipe.vacuum_pre_3_chart_setpointx.setpointHMI,recipe.vacuum_pre_max_time.setpointHMI)"
|
||||
></svg-chart>
|
||||
|
||||
+4
@@ -36,16 +36,19 @@
|
||||
<article class="shrink ml-10">
|
||||
<scheda
|
||||
class="box-500 mb-10"
|
||||
id="vacuum_aux_1_chart_setpointy"
|
||||
:portata="recipe.vacuum_aux_1_chart_setpointy"
|
||||
:durata="recipe.vacuum_aux_1_chart_setpointx"
|
||||
></scheda>
|
||||
<scheda
|
||||
class="box-500 mb-10 color_2"
|
||||
id="vacuum_aux_2_chart_setpointy"
|
||||
:portata="recipe.vacuum_aux_2_chart_setpointy"
|
||||
:durata="recipe.vacuum_aux_2_chart_setpointx"
|
||||
></scheda>
|
||||
<scheda
|
||||
class="box-500 mb-10 color_3"
|
||||
id="vacuum_aux_3_chart_setpointy"
|
||||
:portata="recipe.vacuum_aux_3_chart_setpointy"
|
||||
:durata="recipe.vacuum_aux_3_chart_setpointx"
|
||||
></scheda>
|
||||
@@ -55,6 +58,7 @@
|
||||
line-bar-color="#848484"
|
||||
:bars="bars"
|
||||
:lines="lines"
|
||||
:ids="['vacuum_aux_1_chart_setpointy','vacuum_aux_2_chart_setpointy','vacuum_aux_3_chart_setpointy']"
|
||||
:max-y="Math.max(recipe.vacuum_aux_1_chart_setpointy.range.max , recipe.vacuum_aux_2_chart_setpointy.range.max ,recipe.vacuum_aux_3_chart_setpointy.range.max)"
|
||||
:max-x="Math.max(recipe.vacuum_aux_1_chart_setpointx.setpointHMI+recipe.vacuum_aux_2_chart_setpointx.setpointHMI+recipe.vacuum_aux_3_chart_setpointx.setpointHMI, recipe.vacuum_aux_max_time.setpointHMI)"
|
||||
></svg-chart>
|
||||
|
||||
+4
@@ -33,16 +33,19 @@
|
||||
<article class="shrink ml-10">
|
||||
<scheda
|
||||
class="box-500 mb-10"
|
||||
id="vacuum_main_1_chart_setpointy"
|
||||
:portata="recipe.vacuum_main_1_chart_setpointy"
|
||||
:durata="recipe.vacuum_main_1_chart_setpointx"
|
||||
></scheda>
|
||||
<scheda
|
||||
class="box-500 mb-10 color_2"
|
||||
id="vacuum_main_2_chart_setpointy"
|
||||
:portata="recipe.vacuum_main_2_chart_setpointy"
|
||||
:durata="recipe.vacuum_main_2_chart_setpointx"
|
||||
></scheda>
|
||||
<scheda
|
||||
class="box-500 mb-10 color_3"
|
||||
id="vacuum_main_3_chart_setpointy"
|
||||
:portata="recipe.vacuum_main_3_chart_setpointy"
|
||||
:durata="recipe.vacuum_main_3_chart_setpointx"
|
||||
></scheda>
|
||||
@@ -52,6 +55,7 @@
|
||||
line-bar-color="#848484"
|
||||
:bars="bars"
|
||||
:lines="lines"
|
||||
:ids="['vacuum_main_1_chart_setpointy','vacuum_main_2_chart_setpointy','vacuum_main_3_chart_setpointy']"
|
||||
:max-y="Math.max(recipe.vacuum_main_1_chart_setpointy.range.max , recipe.vacuum_main_2_chart_setpointy.range.max ,recipe.vacuum_main_3_chart_setpointy.range.max)"
|
||||
:max-x="Math.max(recipe.vacuum_main_1_chart_setpointx.setpointHMI+recipe.vacuum_main_2_chart_setpointx.setpointHMI+recipe.vacuum_main_3_chart_setpointx.setpointHMI,recipe.vacuum_main_max_time.setpointHMI)"
|
||||
></svg-chart>
|
||||
|
||||
Reference in New Issue
Block a user