pgup/pgdown now move focus... (some tuning might still be needed)

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2023-10-23 14:51:27 +03:00
parent ecf40bb455
commit 0e5d188cad
2 changed files with 19 additions and 9 deletions

View File

@ -1462,19 +1462,29 @@ var Outline = {
evt.preventDefault()
this.focus(-1) },
PageUp: function(evt){
var that = this
var edited = this.get('edited')
if(!edited
&& (evt.shiftKey
|| evt.ctrlKey)){
if(edited){
return }
if(evt.shiftKey
|| evt.ctrlKey){
evt.preventDefault()
this.shift('up') } },
this.shift('up')
} else {
that.focus(
that.get('viewport')[0], 'prev') } },
PageDown: function(evt){
var that = this
var edited = this.get('edited')
if(!edited
&& (evt.shiftKey
|| evt.ctrlKey)){
if(edited){
return }
if(evt.shiftKey
|| evt.ctrlKey){
evt.preventDefault()
this.shift('down') } },
this.shift('down')
} else {
that.focus(
that.get('viewport').at(-1), 'next') } },
// indent..
Tab: function(evt){

View File

@ -50,7 +50,6 @@ var setup = function(){
-
- ## ToDo:
- crop: show crop path (and depth)
- pgup/pgdown/~home/end~ buttons
- identify a block:
- DONE index (flat)
- DONE path (index)
@ -118,6 +117,7 @@ var setup = function(){
block text
- NOTE: this is only a problem if making list-items manually -- disable???
- empty item height is a bit off...
- DONE pgup/pgdown/home/end buttons
- DONE FEATURE: "crop" -- view block tree separately...
- DONE unify attr parsing
collapsed:: true