Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2023-10-25 17:37:02 +03:00
parent b80312497c
commit d21d233b07
3 changed files with 8 additions and 5 deletions

View File

@ -101,7 +101,8 @@
.editor.block-offsets .outline .block { .editor.block-offsets .outline .block {
border-left: solid 1px silver; border-left: solid 1px silver;
} }
.editor .outline .block .block { .editor .outline .block .block,
.editor.crop .outline .block[cropped] .block[cropped] {
margin-left: var(--item-indent); margin-left: var(--item-indent);
} }
.editor .outline .block>.text { .editor .outline .block>.text {
@ -264,6 +265,8 @@ editor .outline .block:focus {
/* crop... */ /* crop... */
/* NOTE: also see rules for: .editor .outline .block .block
* ...can we avoid this?? (XXX) */
.editor.crop .outline .block:not([cropped]) { .editor.crop .outline .block:not([cropped]) {
padding: 0; padding: 0;
border: none; border: none;

View File

@ -1399,6 +1399,8 @@ var Outline = {
var block = document.createElement('div') var block = document.createElement('div')
block.classList.add('block') block.classList.add('block')
block.setAttribute('tabindex', '0') block.setAttribute('tabindex', '0')
// XXX hack??
block.setAttribute('cropped', '')
// code... // code...
var code = document.createElement('textarea') var code = document.createElement('textarea')
.autoUpdateSize() .autoUpdateSize()
@ -1422,10 +1424,10 @@ var Outline = {
: place : place
;(place == 'next' ;(place == 'next'
&& (cur.querySelector('.block') && (cur.querySelector('.block')
|| cur.nextElementSibling)) ? || cur !== this.get(-1))) ?
this.get(place).before(block) this.get(place).before(block)
: (place == 'next' : (place == 'next'
&& !cur.nextElementSibling) ? && cur === this.get(-1)) ?
cur.after(block) cur.after(block)
: (place == 'before' || place == 'after') ? : (place == 'before' || place == 'after') ?
cur[place](block) cur[place](block)

View File

@ -48,8 +48,6 @@ var setup = function(){
- -
- ## Bugs: - ## Bugs:
focused:: true focused:: true
- BUG: crop: adding siblings to crop root instantly hides them
- _should add `.cropped` class... but where???_
- BUG: mobile browsers behave quite chaotically ignoring parts of the styling... - BUG: mobile browsers behave quite chaotically ignoring parts of the styling...
- -
- ## ToDo: - ## ToDo: