diff --git a/experiments/outline-editor/editor.css b/experiments/outline-editor/editor.css index 64df16f..c93fbfd 100755 --- a/experiments/outline-editor/editor.css +++ b/experiments/outline-editor/editor.css @@ -284,17 +284,17 @@ border: none; background: none; - &>.text { + .text { display: none; } } &, &[cropped] { margin-left: 0; - - & .text { - display: block; - } + } + /* XXX nesting this in &[cropped] for some reaon breaks things... */ + &[cropped] .text { + display: block; } } diff --git a/experiments/outline-editor/editor.js b/experiments/outline-editor/editor.js index 816f5ac..79fd842 100755 --- a/experiments/outline-editor/editor.js +++ b/experiments/outline-editor/editor.js @@ -1255,7 +1255,7 @@ var Outline = { + this.path(...arguments, 'text') .slice(0, -1) .map(function(s, i, {length}){ - return `${ + return `${ plugin.encode(s) } ` }) .join(' / ') @@ -2177,6 +2177,14 @@ var Outline = { function(evt){ that.__change__() }) + // header... + var header = this.header + header.addEventListener('click', + function(evt){ + var elem = evt.target + if(elem.classList.contains('path-item')){ + that.uncrop(elem.getAttribute('uncrop') ?? 'all') } }) + // toolbar... var toolbar = this.toolbar if(toolbar){