Skip to content

Commit

Permalink
minor fix in slider control for servo
Browse files Browse the repository at this point in the history
  • Loading branch information
jp112sdl committed Mar 7, 2020
1 parent 7fab578 commit 89afaee
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
2 changes: 1 addition & 1 deletion patchsource/www/webui/js/extern/sliderControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ sliderControl = function(type,id, val, iViewOnly, bSliderPosFlag,min, max, facto
this.n_pathLeft = 1;
this.n_pathTop = 1;
this.n_pathLength = 190;
this.s_imgControlGreen = (type == "Servo") ?'/ise/img/slider/servoslider_grey.png':'/ise/img/slider/slider_yellow.png';
this.s_imgControlGray = (type == "Servo") ?'/ise/img/slider/servoslider_grey.png':'/ise/img/slider/slider_grey.png';
this.s_imgControlGray = (type == "Servo") ?'/ise/img/slider/servoslider_grey.png':'/ise/img/slider/slider_yellow.png';
this.s_imgSlider = '/ise/img/slider/slider.gif';

// register in the global collection
Expand Down
2 changes: 1 addition & 1 deletion src/addon/patch/common/sliderControl.js.patch
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
this.n_pathLength = 190;
- this.s_imgControlGray = '/ise/img/slider/slider_grey.png';
- this.s_imgControlGreen = '/ise/img/slider/slider_yellow.png';
+ this.s_imgControlGreen = (type == "Servo") ?'/ise/img/slider/servoslider_grey.png':'/ise/img/slider/slider_yellow.png';
+ this.s_imgControlGray = (type == "Servo") ?'/ise/img/slider/servoslider_grey.png':'/ise/img/slider/slider_grey.png';
+ this.s_imgControlGray = (type == "Servo") ?'/ise/img/slider/servoslider_grey.png':'/ise/img/slider/slider_yellow.png';
this.s_imgSlider = '/ise/img/slider/slider.gif';

// register in the global collection
22 changes: 22 additions & 0 deletions src/addon/patch/revoke/common/0016-sliderControl.js.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
--- ./patchsource/www/webui/js/extern/sliderControl.js.orig
+++ ./patchsource/www/webui/js/extern/sliderControl.js
@@ -29,7 +29,7 @@
if (factor) {this.factor = 100/(max-min);} else {this.factor = 1}

this.n_minValue = 0;
- this.n_maxValue = 100;
+ this.n_maxValue = (type == "Servo") ? 180 : 100;

this.n_step = 0;
this.s_form = null;
@@ -45,8 +45,8 @@
this.n_pathLeft = 1;
this.n_pathTop = 1;
this.n_pathLength = 190;
- this.s_imgControlGray = '/ise/img/slider/slider_grey.png';
- this.s_imgControlGreen = '/ise/img/slider/slider_yellow.png';
+ this.s_imgControlGray = (type == "Servo") ?'/ise/img/slider/servoslider_grey.png':'/ise/img/slider/slider_grey.png';
+ this.s_imgControlGray = (type == "Servo") ?'/ise/img/slider/servoslider_grey.png':'/ise/img/slider/slider_yellow.png';
this.s_imgSlider = '/ise/img/slider/slider.gif';

// register in the global collection

0 comments on commit 89afaee

Please sign in to comment.