MCPcopy Index your code
hub / github.com/ajatkj/scriptable / parseWidthHeight

Function parseWidthHeight

LSWeather.js:812–823  ·  view source on GitHub ↗
(wh,field)

Source from the content-addressed store, hash-verified

810FUNCTION parseWidthHeight
811------------------------------------------------------------------*/
812function parseWidthHeight(wh,field){
813 const imageSize=DEVICE_RESOLUTION;
814 let half,full;
815 if (wh == 'w') {
816 half = imageSize.width/2;
817 full = imageSize.width;
818 } else {
819 half = imageSize.height/2;
820 full = imageSize.height;
821 }
822 return eval(`${field}`);
823}
824/*------------------------------------------------------------------
825FUNCTION parseCoordinates
826------------------------------------------------------------------*/

Callers 1

updateLayoutFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected