@@ -99,11 +99,12 @@ export class DP100Element extends DP100(LitElement) {
9999 :host {
100100 display: grid;
101101 grid-template:
102- "graph graph graph vOut vOut " 2fr
103- "graph graph graph iOut iOut " 2fr
104- "graph graph graph pOut pOut " 1fr
105- "mode opp vInMax info reset " 120px / 1fr 1fr 1fr minmax(24vh, max-content) minmax(18vh , max-content);
102+ "graph graph graph vOut" 2fr
103+ "graph graph graph iOut" 2fr
104+ "graph graph graph pOut" 1fr
105+ "controls controls controls controls " 120px / 1fr 1fr 1fr minmax(42vh , max-content);
106106 height: 100vh;
107+ overflow: hidden;
107108 }
108109
109110 * {
@@ -123,7 +124,7 @@ export class DP100Element extends DP100(LitElement) {
123124 .label {
124125 grid-area: label;
125126 font-weight: bold;
126- font-size: 4em;
127+ font-size: min(4vw, 4em) ;
127128 margin: auto 0;
128129
129130 sub {
@@ -212,32 +213,23 @@ export class DP100Element extends DP100(LitElement) {
212213 font-size: 2em;
213214 }
214215
215- #mode {
216- grid-area: mode;
216+ #controls {
217+ grid-area: controls;
218+ display: flex;
219+ flex-direction: row;
220+ justify-content: space-between;
221+ gap: 1em;
217222 }
218223
219- #reset {
220- grid-area: reset ;
224+ #mode {
225+ flex: 0 0 32vw ;
221226 }
222227
223228 #opp, #vInMax, #info {
224229 padding: 0.5em;
225230 gap: 0.5em;
226231 }
227232
228- #opp {
229- grid-area: opp;
230- }
231-
232- #vInMax {
233- grid-area: vInMax;
234- }
235-
236- #info {
237- grid-area: info;
238- }
239-
240-
241233 input:invalid {
242234 border: medium dashed red;
243235 }
@@ -253,7 +245,7 @@ export class DP100Element extends DP100(LitElement) {
253245 }
254246
255247 button {
256- font-size: 5vw;
248+ font-size: min( 5vw, 5em) ;
257249 font-weight: bold;
258250 width: 100%;
259251 height: 100%;
@@ -376,49 +368,51 @@ export class DP100Element extends DP100(LitElement) {
376368 Wh
377369 </ div >
378370 </ div >
379- < div id ="mode ">
380- ${ this . renderMode ( ) }
381- </ div >
382- < div id ="opp " class ="group ">
383- < div class ="label "> OPP</ div >
384- < div class ="value-1 ">
385- OVP
386- < input type ="number " @change =${ this . changeOverVoltageProtection . bind ( this ) }
387- .value =${ this . settings ?. ovp_set } min="0"
388- max="30.5" step="0.01">
389- V
390- </ div >
391- < div class ="value-2 ">
392- OCP
393- < input type ="number " @change =${ this . changeOverCurrentProtection . bind ( this ) }
394- .value =${ this . settings ?. ocp_set } min="0"
395- max="5.05" step="0.001">
396- A
371+ < div id ="controls ">
372+ < div id ="mode ">
373+ ${ this . renderMode ( ) }
397374 </ div >
398- </ div >
399- < div id ="vInMax " class ="group ">
400- < div class ="label "> < em > V</ em > </ div >
401- < div class ="value-1 "> in
402- ${ this . info ?. vIn . toLocaleString ( undefined , { minimumFractionDigits : 3 , minimumIntegerDigits : 2 } ) }  V
375+ < div id ="opp " class ="group ">
376+ < div class ="label "> OPP</ div >
377+ < div class ="value-1 ">
378+ OVP
379+ < input type ="number " @change =${ this . changeOverVoltageProtection . bind ( this ) }
380+ .value =${ this . settings ?. ovp_set } min="0"
381+ max="30.5" step="0.01">
382+ V
383+ </ div >
384+ < div class ="value-2 ">
385+ OCP
386+ < input type ="number " @change =${ this . changeOverCurrentProtection . bind ( this ) }
387+ .value =${ this . settings ?. ocp_set } min="0"
388+ max="5.05" step="0.001">
389+ A
390+ </ div >
403391 </ div >
404- < div class ="value-2 "> maxOut
405- ${ this . info ?. voMax . toLocaleString ( undefined , { minimumFractionDigits : 3 } ) }  V
392+ < div id ="vInMax " class ="group ">
393+ < div class ="label "> < em > V</ em > </ div >
394+ < div class ="value-1 "> in
395+ ${ this . info ?. vIn . toLocaleString ( undefined , { minimumFractionDigits : 3 , minimumIntegerDigits : 2 } ) }  V
396+ </ div >
397+ < div class ="value-2 "> maxOut
398+ ${ this . info ?. voMax . toLocaleString ( undefined , { minimumFractionDigits : 3 } ) }  V
399+ </ div >
406400 </ div >
407- </ div >
408- < div id ="info " class ="group ">
409- < div class ="label "> T</ div >
410- < div class ="value-1 ">
411- ${ this . info ?. temp1 . toLocaleString ( undefined , { minimumFractionDigits : 1 } ) }
412- °C
401+ < div id ="info " class ="group ">
402+ < div class ="label "> T</ div >
403+ < div class ="value-1 ">
404+ ${ this . info ?. temp1 . toLocaleString ( undefined , { minimumFractionDigits : 1 } ) }
405+ °C
406+ </ div >
407+ < div class ="value-2 ">
408+ ${ this . info ?. temp2 . toLocaleString ( undefined , { minimumFractionDigits : 1 } ) }
409+ °C
410+ </ div >
413411 </ div >
414- < div class ="value-2 ">
415- ${ this . info ?. temp2 . toLocaleString ( undefined , { minimumFractionDigits : 1 } ) }
416- °C
412+ < div id ="reset ">
413+ < button @click =${ this . reset . bind ( this ) } > RST</ button >
417414 </ div >
418415 </ div >
419- < div id ="reset ">
420- < button @click =${ this . reset . bind ( this ) } > RST</ button >
421- </ div >
422416 `
423417 }
424418
0 commit comments