Compare commits

...

2 Commits

Author SHA1 Message Date
360103bee3 notes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2023-10-27 16:08:27 +03:00
4796ba6753 experimentiong with selection...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
2023-10-27 14:47:56 +03:00
3 changed files with 29 additions and 2 deletions

View File

@ -259,8 +259,9 @@ editor .outline .block:focus {
content: "●";
}
/* select... */
/* XXX are we selecting subtrees or blocks??? */
.editor .outline [selected] {
.editor .outline [selected]>.text {
background: silver;
}

View File

@ -1645,7 +1645,6 @@ var Outline = {
} else {
evt.preventDefault()
this.focus('focused', 1) } },
// horizontal navigation / collapse...
ArrowLeft: function(evt){
var edited = this.get('edited')
@ -1862,6 +1861,28 @@ var Outline = {
evt.preventDefault()
tasks.toggleDone(this) },
// selection...
// XXX need more work...
// - should we select the .block or .text???
// - we should remember the first state and apply it (a-la FAR)
// and not simply toggle on/off per node...
s_ArrowUp: function(evt){
if(this.get('edited')){
return }
var elem = this.get()
elem.hasAttribute('selected') ?
elem.removeAttribute('selected')
: elem.setAttribute('selected', '')
this.keyboard.ArrowUp.call(this, evt) },
s_ArrowDown: function(evt){
if(this.get('edited')){
return }
var elem = this.get()
elem.hasAttribute('selected') ?
elem.removeAttribute('selected')
: elem.setAttribute('selected', '')
this.keyboard.ArrowDown.call(this, evt) },
// toggle checkbox...
' ': function(evt){
if(this.get('edited') != null){

View File

@ -49,6 +49,11 @@ var setup = function(){
- ## Bugs:
focused:: true
- BUG: mobile browsers behave quite chaotically ignoring parts of the styling...
- FF:
- zooming on edited field
- normal textarea is not sized correctly
- General:
- side margins are a bit too large (account for toolbat to the right)
-
- ## ToDo:
- selection / multiple node selection (via shift+motion)