Skip to content

Commit

Permalink
Modify fun
Browse files Browse the repository at this point in the history
  • Loading branch information
Mmasoud1 committed Jan 14, 2024
1 parent bebe132 commit 80a3c82
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions js/histojs/designFunctionsv4.js
Original file line number Diff line number Diff line change
Expand Up @@ -3420,10 +3420,10 @@
* @param {number} hostIndex
*/

onSelectedHost = async(hostIndex) => {
let curHostObjEntry = await findObjectByKeyValueTFJS(Settings.dsaServers, 'id', hostIndex.toString());
onSelectedHost = (hostIndex) => {
let curHostObjEntry = findObjectByKeyValue(Settings.dsaServers, 'id', hostIndex.toString());
setHostObjEntry(curHostObjEntry); // save current selected host info to currentHostCollectSelectionStates.hostObject
let hostAPI = await findObjectByKeyValueTFJS(Settings.dsaServers, 'id', hostIndex.toString()).hostAPI;
let hostAPI = findObjectByKeyValue(Settings.dsaServers, 'id', hostIndex.toString()).hostAPI;
setHostIndex(hostIndex);
if(lastHostCollectSelectionStates.hostIndex != hostIndex){
if(lastHostCollectSelectionStates.hostIndex != null){
Expand Down Expand Up @@ -3831,16 +3831,16 @@
* @param {number} channelIndex
*/

onChannelCheckboxClick = async(channelIndex) => {
onChannelCheckboxClick = (channelIndex) => {
let item = getSelectedItem();
let omeSceneDescription = item.meta.omeSceneDescription;
// console.log("channel index :", channelIndex);
let channelEntry = await findObjectByKeyValueTFJS(omeSceneDescription, 'channel_number', channelIndex)
let channelEntry = findObjectByKeyValue(omeSceneDescription, 'channel_number', channelIndex)
if(!tempSceneSelections.length) {
tempSceneSelections.push( channelEntry);
document.getElementById("ChannelCheckboxId"+channelIndex).innerHTML = '<i class="fa fa-check-square" >&nbsp&nbsp</i>';
} else {
let checkExistRecord = await findObjectByKeyValueTFJS(tempSceneSelections, 'channel_number', channelIndex);
let checkExistRecord = findObjectByKeyValue(tempSceneSelections, 'channel_number', channelIndex);

if(checkExistRecord) {
// if exist and clicked --> remove
Expand Down

0 comments on commit 80a3c82

Please sign in to comment.