cleanup...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2023-09-29 15:38:17 +03:00
parent 94ef144c0f
commit 66c29d3f21
3 changed files with 11 additions and 12 deletions

View File

@ -57,5 +57,5 @@
}
.editor div:focus>span,
.editor div:focus>textarea {
background: silver;
background: rgba(0,0,0,0.1);
}

View File

@ -31,8 +31,8 @@ var Outline = {
// config...
//
left_key_expands: false,
right_key_collapses: true,
left_key_collapses: true,
right_key_expands: true,
// XXX revise name...
@ -289,18 +289,17 @@ var Outline = {
if(this.dom.querySelector('.editor textarea:focus')){
// XXX if at end of element move to next...
return }
if(this.left_key_expands){
;((this.left_key_collapses
|| evt.shiftKey)
&& this.get().getAttribute('collapsed') == null
&& this.get('children').length > 0) ?
this.toggleCollapse(true)
this.get('parent')?.focus()
} else {
evt.shiftKey ?
this.toggleCollapse(true)
: this.get('parent')?.focus() } },
: this.get('parent')?.focus() },
ArrowRight: function(evt){
if(this.dom.querySelector('.editor textarea:focus')){
// XXX if at end of element move to next...
return }
if(this.right_key_collapses){
if(this.right_key_expands){
this.toggleCollapse(false)
var child = this.get('children')[0]
child?.focus()

View File

@ -63,7 +63,7 @@ TODO:
- shifting nodes up/down
- multiple node selection
- <s>serialize</s>/deserialize
- add optional styling to nodes
- <s>add optional text styling to nodes</s>
Controls:
up - focus node above