fix client problems and slider behaviour
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<IsSCM>false</IsSCM>
|
||||
<TranspColor>#FF00FF</TranspColor>
|
||||
<RenderingMethod>GPU</RenderingMethod> <!-- GPU/CPU -->
|
||||
<ShowVirtualKeyboard>false</ShowVirtualKeyboard>
|
||||
<ShowVirtualKeyboard>true</ShowVirtualKeyboard>
|
||||
<RunningOnSecondaryScreen>false</RunningOnSecondaryScreen>
|
||||
<DeveloperMode>true</DeveloperMode>
|
||||
</Client>
|
||||
|
||||
@@ -434,7 +434,7 @@ namespace Active_Client.View
|
||||
string dom = ev.Node.GetElementAttribute("type").ToLower();
|
||||
|
||||
//Filter if the node Type is TEXT or PASSWORD
|
||||
if (dom != null && (dom.Equals("text") || dom.Equals("password")))
|
||||
if (dom != null && (dom.Equals("text") || dom.Equals("password") || dom.Equals("")))
|
||||
NcWindow.openVirtualKeyboard(ev.Node.ElementBounds, ev.Browser.Identifier > 1, false);
|
||||
}
|
||||
//Filter if this node is TEXTAREA Node
|
||||
|
||||
@@ -38,6 +38,7 @@ export default class Slider extends Vue {
|
||||
incrementingStep: number;
|
||||
|
||||
step: number = 1;
|
||||
initalStep: number = 1;
|
||||
// get step() {
|
||||
// var s = ((this.value.range.max - this.value.range.min) / (this.lines + 1));
|
||||
// var m = Math.pow(10, this.decimal);
|
||||
@@ -46,44 +47,45 @@ export default class Slider extends Vue {
|
||||
// };
|
||||
|
||||
mounted() {
|
||||
this.step = 1 / Math.pow(10, this.value.numDec);
|
||||
this.initalStep = 1 / Math.pow(10, this.value.numDec);
|
||||
this.step = this.initalStep;
|
||||
if (Number.isNaN(this.step)) this.step = 1;
|
||||
}
|
||||
|
||||
startIncrement() {
|
||||
if (!this.value.status.enabled) return;
|
||||
this.incrementValue();
|
||||
this.incrementing = setInterval(this.incrementValue, 50);
|
||||
this.incrementing = setInterval(this.incrementValue, 100);
|
||||
}
|
||||
|
||||
startDecrement() {
|
||||
if (!this.value.status.enabled) return;
|
||||
this.decrementValue();
|
||||
this.incrementing = setInterval(this.decrementValue, 50);
|
||||
this.incrementing = setInterval(this.decrementValue, 100);
|
||||
}
|
||||
|
||||
decrementValue(){
|
||||
var v = this.value.setpointHMI;
|
||||
if (v < this.value.range.max) {
|
||||
v += Math.floor(this.step);
|
||||
this.step += this.incrementingStep;
|
||||
v -= this.step;
|
||||
this.step += this.incrementingStep * this.initalStep;
|
||||
}
|
||||
if (v > this.value.range.max) {
|
||||
v = this.value.range.max;
|
||||
}
|
||||
this.actualvalue = v;
|
||||
this.actualvalue = parseFloat(v.toFixed(this.value.numDec));
|
||||
}
|
||||
|
||||
incrementValue(){
|
||||
var v = this.value.setpointHMI;
|
||||
if (v < this.value.range.max) {
|
||||
v += Math.floor(this.step);
|
||||
this.step += this.incrementingStep;
|
||||
v += this.step;
|
||||
this.step += this.incrementingStep * this.initalStep;
|
||||
}
|
||||
if (v > this.value.range.max) {
|
||||
v = this.value.range.max;
|
||||
}
|
||||
this.actualvalue = v;
|
||||
this.actualvalue = parseFloat(v.toFixed(this.value.numDec));
|
||||
}
|
||||
|
||||
confirm() {
|
||||
@@ -92,7 +94,7 @@ export default class Slider extends Vue {
|
||||
clearInterval(this.incrementing);
|
||||
|
||||
this.incrementing = 0;
|
||||
this.step = 1;
|
||||
this.step = this.initalStep;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
<span v-for="iter in lines" :key="iter" class="line"></span>
|
||||
</div>
|
||||
<div class="labels">
|
||||
<small>{{`${this.value.range.min} ${this.value.unitMeasure}`}}</small>
|
||||
<small>{{`${(this.value.range.max - this.value.range.min) / 2 + this.value.range.min} ${this.value.unitMeasure}`}}</small>
|
||||
<small>{{`${this.value.range.max} ${this.value.unitMeasure}`}}</small>
|
||||
<small>{{`${this.value.range.min.toFixed(this.value.numDec)} ${this.value.unitMeasure}`}}</small>
|
||||
<small>{{`${((this.value.range.max - this.value.range.min) / 2 + this.value.range.min).toFixed(this.value.numDec)} ${this.value.unitMeasure}`}}</small>
|
||||
<small>{{`${this.value.range.max.toFixed(this.value.numDec)} ${this.value.unitMeasure}`}}</small>
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn btn-info square"
|
||||
|
||||
Reference in New Issue
Block a user