Changeset 351 in tmcsimulator for trunk/webapps/js/harLayer.js


Ignore:
Timestamp:
03/31/2019 10:20:47 AM (7 years ago)
Author:
jdalbey
Message:

updated ei notebook proof of concepts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/webapps/js/harLayer.js

    r338 r351  
    9393    { 
    9494        document.getElementById('har-msgdisplay1').value = ""; 
    95         saveMessage(""); 
     95        saveHARMessage(""); 
    9696    } 
    9797 
     
    102102        var harID = document.getElementById('harID').value; 
    103103        HARmessageDict[harID].har.message.phase1.Line1 = outMessage; 
    104  
    105         // TODO Set icon to reflect message state 
     104        // Set icon to reflect message state 
    106105        if (outMessage == "") 
    107106        { 
     107            currentIcon = {icon: iconHARidle}; 
    108108        } 
    109109        else 
    110110        { 
     111            currentIcon = {icon: iconHARactive}; 
    111112        } 
    112         //harLayer.overrideStyle(harLayer.getFeatureById(harID), currentIcon) 
    113         // break the json string into lines for readability 
     113        harLayer.overrideStyle(harLayer.getFeatureById(harID), currentIcon) 
     114        // convert messasge to json string  
    114115        jsonstring = JSON.stringify(Object.values(HARmessageDict)); 
    115116        outString = "{\"data\":" + jsonstring + "}"; 
     
    147148                var item = messagejson.data[i]; 
    148149                HARmessageDict[item.har.index] = item; 
    149                 // TODO Set the appropriate icon on the har icon 
     150                // Set the appropriate icon on the har icon 
    150151                //  if there's currently no message 
    151152                if (item.har.message.phase1.Line1 == "") 
    152153                { 
     154                    cmsLayer.overrideStyle(cmsLayer.getFeatureById(item.har.index), {icon: iconHARidle}) 
    153155                } 
    154156                else 
    155157                { 
    156                 } 
     158                    cmsLayer.overrideStyle(cmsLayer.getFeatureById(item.har.index), {icon: iconHARactive}) 
     159                }    
    157160            } 
    158161        }); 
Note: See TracChangeset for help on using the changeset viewer.