|
198 | 198 | {display:flex;flex:1;margin:5px 0;gap:10px} |
199 | 199 |
|
200 | 200 | #view1 |
201 | | - {flex:1;display:flex;flex-direction:column;border:1px solid var(--green);padding:5px} |
| 201 | + {flex:1;display:flex;flex-direction:column;border:1px solid var(--green);padding:5px;box-sizing:border-box} |
202 | 202 |
|
203 | 203 | #view2 |
204 | | - {flex:1;display:flex;flex-direction:column;border:1px solid var(--red);padding:5px} |
| 204 | + {flex:1;display:flex;flex-direction:column;border:1px solid var(--red);padding:5px;box-sizing:border-box} |
205 | 205 |
|
206 | 206 |
|
207 | 207 | #hdr |
|
214 | 214 | {flex:1} |
215 | 215 |
|
216 | 216 | #output |
217 | | - {border:1px solid lightgray;padding:5px} |
| 217 | + {border:1px solid lightgray;padding:5px;box-sizing:border-box} |
218 | 218 |
|
219 | 219 | /* |
220 | 220 | #output-hldr |
|
254 | 254 | <file-mod id=file1 component></file-mod> |
255 | 255 | <div id=label>primary</div> |
256 | 256 | </div> |
257 | | - <web-editor id=editor1 component></web-editor> |
| 257 | + <web-editor id=editor1 component mode=text></web-editor> |
258 | 258 | </div> |
| 259 | + |
| 260 | + <div id=slider-1 style='width:10px;cursor:ew-resize'></div> |
| 261 | + |
259 | 262 | <div id=view2> |
260 | 263 | <div id=hdr> |
261 | 264 | <file-mod id=file2 component></file-mod> |
262 | 265 | <div id=label>secondary</div> |
263 | 266 | </div> |
264 | | - <web-editor id=editor2 component></web-editor> |
| 267 | + <web-editor id=editor2 component mode=text></web-editor> |
265 | 268 | </div> |
266 | 269 | </div> |
| 270 | + |
| 271 | + <div id=slider-2 style='height:10px;cursor:ns-resize'></div> |
| 272 | + |
267 | 273 |
|
268 | | - <web-editor id=output component></web-editor> |
| 274 | + <web-editor id=output component mode=text></web-editor> |
269 | 275 | <!-- |
270 | 276 | <div id=output-hldr> |
271 | 277 | <web-editor id=output component></web-editor> |
272 | 278 | </div> |
273 | 279 | --> |
274 | 280 |
|
| 281 | + |
275 | 282 |
|
276 | 283 | <log-mod component></log-mod> |
277 | 284 |
|
278 | 285 |
|
279 | | - |
280 | 286 | <checkbox-one-template> |
281 | 287 | <script src='https://html-loader-1024713184986.us-central1.run.app/'></script> |
282 | 288 | </checkbox-one-template> |
|
288 | 294 | <script> |
289 | 295 |
|
290 | 296 |
|
291 | | - var slider = {}; |
| 297 | + var slider1 = {mode:'vert'}; |
| 298 | + var slider2 = {mode:'horiz'}; |
292 | 299 |
|
293 | 300 | var ui = {}; |
294 | 301 | ui.mode = 'vert'; |
|
314 | 321 | $('#output-hdr [type=checkbox]').onclick = btn['output-chk']; |
315 | 322 | $('[value=check]').onclick = btn.check; |
316 | 323 |
|
317 | | - |
318 | 324 |
|
319 | 325 | var view1 = $('#view1'); |
320 | 326 | primary.filemod.initdom(view1); |
321 | | - primary.editor.initdom(view1,{mode:'text'}); |
| 327 | + primary.editor.initdom(); |
322 | 328 |
|
323 | 329 | var view2 = $('#view2'); |
324 | 330 | secondary.filemod.initdom(view2); |
325 | | - secondary.editor.initdom(view2,{mode:'text'}); |
| 331 | + secondary.editor.initdom(); |
| 332 | + var w = view2.offsetWidth; |
| 333 | + view2.style.flex = 'none'; |
| 334 | + view2.style.width = w+'px'; |
| 335 | + |
326 | 336 |
|
327 | 337 | var node = $('#output'); |
328 | | - await output.initdom(node,{mode:'text'}); |
| 338 | + output.initdom(); |
| 339 | + setTimeout(()=>{ |
| 340 | + var w = node.offsetHeight;console.log('w',w); |
| 341 | + node.style.flex = 'none'; |
| 342 | + node.style.height = w+'px'; |
| 343 | + },500); |
329 | 344 |
|
330 | 345 |
|
| 346 | + slider1.node = $.slider('#view1','#slider-1','#view2',null,slider1); |
| 347 | + slider2.node = $.slider('#main','#slider-2','#output',null,slider2); |
| 348 | + |
| 349 | + |
| 350 | + |
| 351 | + |
| 352 | + |
| 353 | + |
331 | 354 |
|
332 | 355 | var style = document.createElement('style'); |
333 | 356 | style.textContent = ` |
|
0 commit comments