Skip to content

Commit

Permalink
touchscreen mode, code refactoring
Browse files Browse the repository at this point in the history
a lot of requests for making this component touchscreen compatible were made, so I did some major code refactoring
to modularize some of the mouse calls, so they could be
called from the touch DAT's callbacks as well.
  • Loading branch information
EnviralDesign committed Feb 7, 2021
1 parent f620dac commit cbb342d
Show file tree
Hide file tree
Showing 14 changed files with 1,041 additions and 976 deletions.
Binary file modified UGV4.tox
Binary file not shown.
Binary file modified UberGui_V4_Release.toe
Binary file not shown.
6 changes: 3 additions & 3 deletions css/CSS.css
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ html, body {
line-height: |+|Parameterrowheight|+|px;
margin-right: |+|Middlemargins|+|px;
height: 100%;
width: 50%;
width: |+|Labelvaluesplit|+|%;
background-color: rgb(|+|Labelbgcolor|+|);
box-sizing: border-box;
transition: var(--hover-transition-time);
Expand Down Expand Up @@ -144,7 +144,7 @@ background-color: rgb(|+|Primaryinteractcolor|+|);
margin: 0pt;
padding: 0pt;
height: 100%;
width: 50%;
width: |+|Labelvaluesplitinverse|+|%;
display: flex;
}

Expand All @@ -167,7 +167,7 @@ background-color: rgb(|+|Primaryinteractcolor|+|);
line-height: |+|Parameterrowheight|+|px;
padding: 0pt;
height: 100%;
flex: 0 0 20px;
flex: 0 0 |+|Parameterrowheight|+|px;
background-color: rgb(|+|Parameterbgcolor|+|);
box-sizing: border-box;
border-width:0pt;
Expand Down
11 changes: 8 additions & 3 deletions javascript/JS.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,16 @@ function Update_ ( jsonStr ) {
{
val = Math.round( parseFloat(val)*100 ) / 100;
}

var textEl = document.getElementById( id + '_t' );
textEl.innerHTML = val;
var width = textEl.offsetWidth;

var slideEl = document.getElementById( id + '_s' );
slideEl.style.width = (slide*100)+'%';

// document.getElementById( "debug" ).innerHTML = clamp(slide*100 , 0.0 , 100.0);

slideEl.style.width = clamp(slide*100 , 0.0 , 100.0)+'%';


};
Expand Down Expand Up @@ -120,6 +123,8 @@ function Mouse_( jsonStr ) {
var x = jsonObj['x'];
var y = jsonObj['y'];
var argPar = jsonObj['par'];

// document.getElementById( "debug" ).innerHTML = argPar;

var isScrollHover = 0;
if (x > document.body.clientWidth){
Expand Down Expand Up @@ -180,7 +185,7 @@ function Mouse_( jsonStr ) {
}
}
else if ( Last_Par_Id == Current_Par_Id ) {
document.getElementById( "debug" ).innerHTML = deepestElement.parentNode.parentNode.nextElementSibling.className;
// document.getElementById( "debug" ).innerHTML = deepestElement.parentNode.parentNode.nextElementSibling.className;
if ( deepestElement.parentNode.parentNode.nextElementSibling.className == "spacer_section" ){
Next_Par_Id = deepestElement.parentNode.parentNode.nextElementSibling.nextElementSibling.children[2].firstElementChild.id;
}
Expand Down
Loading

0 comments on commit cbb342d

Please sign in to comment.