diff --git a/experiments/outline-editor/editor.js b/experiments/outline-editor/editor.js index 2fad816..25d4ceb 100755 --- a/experiments/outline-editor/editor.js +++ b/experiments/outline-editor/editor.js @@ -1057,6 +1057,7 @@ var Outline = { var stack = this.__crop_stack ??= [] stack.push([this.json(), this.path()]) this.load(this.data()) + this.dom.classList.add('crop') return this }, // XXX use JSON API... uncrop: function(){ @@ -1064,7 +1065,8 @@ var Outline = { return this} var [state, path] = this.__crop_stack.pop() if(this.__crop_stack.length == 0){ - this.__crop_stack = undefined } + this.__crop_stack = undefined + this.dom.classList.remove('crop') } // update state... path .slice(0, -1) diff --git a/experiments/outline-editor/generic.js b/experiments/outline-editor/generic.js index 9fdcf9d..af23e08 100755 --- a/experiments/outline-editor/generic.js +++ b/experiments/outline-editor/generic.js @@ -76,6 +76,8 @@ HTMLTextAreaElement.prototype.getTextGeometry = function(){ span.append( text.slice(0, offset), carret, + // NOTE: wee need the rest of the text for the carret to be typeset + // to the correct line... text.slice(offset)) document.body.append(span)