|
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 | 259 |
|
260 | 260 | <div id=slider-1 style='width:10px;cursor:ew-resize'></div> |
|
264 | 264 | <file-mod id=file2 component></file-mod> |
265 | 265 | <div id=label>secondary</div> |
266 | 266 | </div> |
267 | | - <web-editor id=editor2 component></web-editor> |
| 267 | + <web-editor id=editor2 component mode=text></web-editor> |
268 | 268 | </div> |
269 | 269 | </div> |
270 | 270 |
|
| 271 | + <div id=slider-2 style='height:10px;cursor:ns-resize'></div> |
271 | 272 |
|
272 | 273 |
|
273 | | - <web-editor id=output component></web-editor> |
| 274 | + <web-editor id=output component mode=text></web-editor> |
274 | 275 | <!-- |
275 | 276 | <div id=output-hldr> |
276 | 277 | <web-editor id=output component></web-editor> |
|
294 | 295 |
|
295 | 296 |
|
296 | 297 | var slider1 = {mode:'vert'}; |
| 298 | + var slider2 = {mode:'horiz'}; |
297 | 299 |
|
298 | 300 | var ui = {}; |
299 | 301 | ui.mode = 'vert'; |
|
319 | 321 | $('#output-hdr [type=checkbox]').onclick = btn['output-chk']; |
320 | 322 | $('[value=check]').onclick = btn.check; |
321 | 323 |
|
322 | | - |
323 | 324 |
|
324 | 325 | var view1 = $('#view1'); |
325 | 326 | primary.filemod.initdom(view1); |
326 | | - primary.editor.initdom(view1,{mode:'text'}); |
| 327 | + primary.editor.initdom(); |
327 | 328 |
|
328 | 329 | var view2 = $('#view2'); |
329 | 330 | secondary.filemod.initdom(view2); |
330 | | - 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 | + |
331 | 336 |
|
332 | 337 | var node = $('#output'); |
333 | | - 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); |
| 344 | + |
334 | 345 |
|
335 | | - //slider1.root = $('#main'); |
336 | 346 | slider1.node = $.slider('#view1','#slider-1','#view2',null,slider1); |
| 347 | + slider2.node = $.slider('#main','#slider-2','#output',null,slider2); |
337 | 348 |
|
338 | 349 |
|
339 | 350 |
|
|
0 commit comments