@@ -182,20 +182,15 @@ define(function (require, exports, module) {
182182 let _selectionHolder = null ;
183183
184184 /**
185- * Lets something outside the live documents hold the preview selection, such as a
186- * panel with a pick of its own. The caret highlights and scrolls to what it points
187- * at the same as ever, but the held element stays the selected one.
188- * @param {?function(LiveDocument): boolean } holder Returns true while it holds the selection; null removes it.
185+ * While the holder returns true the caret still highlights in the preview but never
186+ * selects, so a selection made elsewhere (the layers panel) stays.
187+ * @param {?function(LiveDocument): boolean } holder null removes it.
189188 */
190189 LiveDocument . setSelectionHolder = function ( holder ) {
191190 _selectionHolder = holder || null ;
192191 } ;
193192
194- /**
195- * How long the caret rests before the preview highlight follows it. Anything else
196- * following the caret waits the same, or a held arrow key moves one and not the other.
197- * @const {number}
198- */
193+ // for anything else that follows the caret and must settle on the same clock
199194 LiveDocument . CURSOR_HIGHLIGHT_DEBOUNCE_MS = CURSOR_HIGHLIGHT_DEBOUNCE_MS ;
200195
201196 function _isSelectionHeld ( liveDoc ) {
@@ -356,8 +351,8 @@ define(function (require, exports, module) {
356351 */
357352 LiveDocument . prototype . highlightRule = function ( name ) {
358353 const keepSelection = _isSelectionHeld ( this ) ;
359- // Around a held selection the same rule draws differently, so it is not the same highlight.
360- const highlight = ( keepSelection ? HELD_HIGHLIGHT_PREFIX : "" ) + name ;
354+ // the same rule draws differently around a held selection
355+ const highlight = ( keepSelection ? HELD_HIGHLIGHT_PREFIX : "" ) + name ;
361356 if ( this . _lastHighlight === highlight ) {
362357 return ;
363358 }
0 commit comments