peikert / proteomics

package development
1 stars 0 forks source link

crosstalk json / Shiny ( merge of issus 21 and 46) #47

Open peikert opened 6 years ago

peikert commented 6 years ago

We need return values for:

peikert commented 6 years ago

for issus #46: if numeric column change the color legend is reset. That fine but changes in color should take into account.

numairmansur commented 6 years ago

Json Object: Shiny.onInputChange(el.id+"_json", x);

Clicked cell On double clicking the cell, the following function is executed, along with opening the link. Shiny.onInputChange(el.id+"_clickedCell", [row,col] ); Where row and col are integer values.

Selected Rows and column Shiny.onInputChange(el.id+"_axis", selectedAxis); Where selectedAxis is a list of the form [row,col] . row is null if column axis is selected. col is null if row axis is selected.

Zoom parameters

Shiny.onInputChange(el.id+"innerworkSpaceDimensions", innerworkSpaceDimensions);

We create a new object that is now passed in the json object. Following is the name and the format of the newly passed object:

innerworkSpaceDimensions = {height:null, 
                            left: null, 
                            top: null, 
                            width: null, 
                            ratioCorrected: false,
                            initialPass: true
}

On the initial rendering of the clustpro object initialPass will be true and all the dimension parameters will be null. On all the subsequent renderings of the clustPro object during the same shiny app session, initialPass will be false and all the relevant parameters will have the value passed by the clustpro object.

Scroll parameters We create a new object that is now passed in the json object.

scrollParameters = { left: 0,
                     right: 0
      }

Every time the scroll bar is moved, the javascript returns the left and top values for the scroll bars. Shiny.onInputChange(el.id+"_scrollParameters", [left,top] ) Where left and right are integers. Intially , both of the values should be 0.

peikert commented 6 years ago

#Selected Rows and column: We need a global variable which contains the selected row and column and is by default [NULL,NULL]. If rows and column are deselected it should also return this variable. By clicking the matrix the row and column is deselected so this function should also set the variable to NULL, NULL and return it.

peikert commented 6 years ago

Timer for scroll https://stackoverflow.com/questions/4620906/how-do-i-know-when-ive-stopped-scrolling-javascript

peikert commented 6 years ago

i found a way how you can test the return values, at least the json one. A created the clustpro_test3 which loads a json file and use it as a parameter for clustpro. If json is submitted no other parameter is used and the widget is generated by the json file.

numairmansur commented 6 years ago

Tested the return values with the temporary json file. Also implemented the timer for scroll values.