Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 43 applySuggestion: function(suggestion, isIntermediateSuggestion) { }, | 43 applySuggestion: function(suggestion, isIntermediateSuggestion) { }, |
| 44 | 44 |
| 45 /** | 45 /** |
| 46 * acceptSuggestion will be always called after call to applySuggestion with isIntermediateSuggestion being equal to false. | 46 * acceptSuggestion will be always called after call to applySuggestion with isIntermediateSuggestion being equal to false. |
| 47 */ | 47 */ |
| 48 acceptSuggestion: function() { }, | 48 acceptSuggestion: function() { }, |
| 49 } | 49 } |
| 50 | 50 |
| 51 /** | 51 /** |
| 52 * @constructor | 52 * @constructor |
| 53 * @implements {WebInspector.StaticViewportControl.Provider} | |
| 53 * @param {!WebInspector.SuggestBoxDelegate} suggestBoxDelegate | 54 * @param {!WebInspector.SuggestBoxDelegate} suggestBoxDelegate |
| 54 * @param {number=} maxItemsHeight | 55 * @param {number=} maxItemsHeight |
| 55 * @param {boolean=} captureEnter | 56 * @param {boolean=} captureEnter |
| 56 */ | 57 */ |
| 57 WebInspector.SuggestBox = function(suggestBoxDelegate, maxItemsHeight, captureEn ter) | 58 WebInspector.SuggestBox = function(suggestBoxDelegate, maxItemsHeight, captureEn ter) |
| 58 { | 59 { |
| 59 this._suggestBoxDelegate = suggestBoxDelegate; | 60 this._suggestBoxDelegate = suggestBoxDelegate; |
| 60 this._length = 0; | 61 this._length = 0; |
| 61 this._selectedIndex = -1; | 62 this._selectedIndex = -1; |
| 62 this._selectedElement = null; | 63 this._selectedElement = null; |
| 63 this._maxItemsHeight = maxItemsHeight; | 64 this._maxItemsHeight = maxItemsHeight; |
| 64 this._maybeHideBound = this._maybeHide.bind(this); | 65 this._maybeHideBound = this._maybeHide.bind(this); |
| 65 this._container = createElementWithClass("div", "suggest-box-container"); | 66 this._container = createElementWithClass("div", "suggest-box-container"); |
| 66 this._element = this._container.createChild("div", "suggest-box"); | 67 this._viewport = new WebInspector.StaticViewportControl(this); |
| 68 this._element = this._viewport.element; | |
| 69 this._element.classList.add("suggest-box"); | |
| 70 this._container.appendChild(this._element); | |
| 67 this._element.addEventListener("mousedown", this._onBoxMouseDown.bind(this), true); | 71 this._element.addEventListener("mousedown", this._onBoxMouseDown.bind(this), true); |
| 68 this._detailsPopup = this._container.createChild("div", "suggest-box details -popup monospace"); | 72 this._detailsPopup = this._container.createChild("div", "suggest-box details -popup monospace"); |
| 69 this._detailsPopup.classList.add("hidden"); | 73 this._detailsPopup.classList.add("hidden"); |
| 70 this._asyncDetailsCallback = null; | 74 this._asyncDetailsCallback = null; |
| 71 /** @type {!Map<number, !Promise<{detail: string, description: string}>>} */ | 75 /** @type {!Map<number, !Promise<{detail: string, description: string}>>} */ |
| 72 this._asyncDetailsPromises = new Map(); | 76 this._asyncDetailsPromises = new Map(); |
| 73 this._userInteracted = false; | 77 this._userInteracted = false; |
| 74 this._captureEnter = captureEnter; | 78 this._captureEnter = captureEnter; |
| 79 /** @type {!Array<!Element>} */ | |
| 80 this._elementList = []; | |
| 81 this._rowHeight = 17; | |
| 82 this._viewportWidth = "100vw"; | |
| 75 } | 83 } |
| 76 | 84 |
| 77 /** | 85 /** |
| 78 * @typedef {!Array.<{title: string, className: (string|undefined)}>} | 86 * @typedef {!Array.<{title: string, className: (string|undefined)}>} |
| 79 */ | 87 */ |
| 80 WebInspector.SuggestBox.Suggestions; | 88 WebInspector.SuggestBox.Suggestions; |
| 81 | 89 |
| 82 WebInspector.SuggestBox.prototype = { | 90 WebInspector.SuggestBox.prototype = { |
| 83 /** | 91 /** |
| 84 * @return {boolean} | 92 * @return {boolean} |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 95 { | 103 { |
| 96 this._updateBoxPosition(anchorBox); | 104 this._updateBoxPosition(anchorBox); |
| 97 }, | 105 }, |
| 98 | 106 |
| 99 /** | 107 /** |
| 100 * @param {!AnchorBox} anchorBox | 108 * @param {!AnchorBox} anchorBox |
| 101 */ | 109 */ |
| 102 _updateBoxPosition: function(anchorBox) | 110 _updateBoxPosition: function(anchorBox) |
| 103 { | 111 { |
| 104 console.assert(this._overlay); | 112 console.assert(this._overlay); |
| 105 if (this._lastAnchorBox && this._lastAnchorBox.equals(anchorBox)) | 113 if (this._lastAnchorBox && this._lastAnchorBox.equals(anchorBox) && this ._lastItemCount === this.itemCount()) |
| 106 return; | 114 return; |
| 115 this._lastItemCount = this.itemCount(); | |
| 107 this._lastAnchorBox = anchorBox; | 116 this._lastAnchorBox = anchorBox; |
| 108 | 117 |
| 109 // Position relative to main DevTools element. | 118 // Position relative to main DevTools element. |
| 110 var container = WebInspector.Dialog.modalHostView().element; | 119 var container = WebInspector.Dialog.modalHostView().element; |
| 111 anchorBox = anchorBox.relativeToElement(container); | 120 anchorBox = anchorBox.relativeToElement(container); |
| 112 var totalHeight = container.offsetHeight; | 121 var totalHeight = container.offsetHeight; |
| 113 var aboveHeight = anchorBox.y; | 122 var aboveHeight = anchorBox.y; |
| 114 var underHeight = totalHeight - anchorBox.y - anchorBox.height; | 123 var underHeight = totalHeight - anchorBox.y - anchorBox.height; |
| 115 | 124 |
| 116 this._overlay.setLeftOffset(anchorBox.x); | 125 this._overlay.setLeftOffset(anchorBox.x); |
| 117 | 126 |
| 118 var under = underHeight >= aboveHeight; | 127 var under = underHeight >= aboveHeight; |
| 119 if (under) | 128 if (under) |
| 120 this._overlay.setVerticalOffset(anchorBox.y + anchorBox.height, true ); | 129 this._overlay.setVerticalOffset(anchorBox.y + anchorBox.height, true ); |
| 121 else | 130 else |
| 122 this._overlay.setVerticalOffset(totalHeight - anchorBox.y, false); | 131 this._overlay.setVerticalOffset(totalHeight - anchorBox.y, false); |
| 123 | 132 |
| 124 /** const */ var rowHeight = 17; | 133 var spacer = 6; |
| 125 /** const */ var spacer = 6; | 134 var maxHeight = this._maxItemsHeight ? this._maxItemsHeight * this._rowH eight : Math.max(underHeight, aboveHeight) - spacer; |
| 126 var maxHeight = this._maxItemsHeight ? this._maxItemsHeight * rowHeight : Math.max(underHeight, aboveHeight) - spacer; | 135 var height = this._rowHeight * this._elementList.length; |
| 127 this._element.style.maxHeight = maxHeight + "px"; | 136 var hasScrollBars = height > maxHeight; |
| 137 this._element.style.height = Math.min(maxHeight, height) + "px"; | |
| 138 }, | |
| 139 | |
| 140 _updateWidth: function() | |
|
einbinder
2016/10/07 23:17:51
This is unfortunate, but I think it's necessary.
| |
| 141 { | |
| 142 if (this._element.offsetHeight + this._rowHeight <= this._rowHeight * th is._elementList.length) { | |
| 143 this._element.style.width = "100vw"; | |
| 144 return; | |
| 145 } | |
| 146 // If there are no scrollbars, set the width to the width of the largest row. | |
| 147 var width = 0; | |
| 148 for (var i = 0; i < this._elementList.length; i++) { | |
| 149 width = Math.max(width, WebInspector.measurePreferredSize(this._elem entList[i], this._element).width); | |
| 150 } | |
| 151 this._element.style.width = width + "px"; | |
| 128 }, | 152 }, |
| 129 | 153 |
| 130 /** | 154 /** |
| 131 * @param {!Event} event | 155 * @param {!Event} event |
| 132 */ | 156 */ |
| 133 _onBoxMouseDown: function(event) | 157 _onBoxMouseDown: function(event) |
| 134 { | 158 { |
| 135 if (this._hideTimeoutId) { | 159 if (this._hideTimeoutId) { |
| 136 window.clearTimeout(this._hideTimeoutId); | 160 window.clearTimeout(this._hideTimeoutId); |
| 137 delete this._hideTimeoutId; | 161 delete this._hideTimeoutId; |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 150 * @suppressGlobalPropertiesCheck | 174 * @suppressGlobalPropertiesCheck |
| 151 */ | 175 */ |
| 152 _show: function() | 176 _show: function() |
| 153 { | 177 { |
| 154 if (this.visible()) | 178 if (this.visible()) |
| 155 return; | 179 return; |
| 156 this._bodyElement = document.body; | 180 this._bodyElement = document.body; |
| 157 this._bodyElement.addEventListener("mousedown", this._maybeHideBound, tr ue); | 181 this._bodyElement.addEventListener("mousedown", this._maybeHideBound, tr ue); |
| 158 this._overlay = new WebInspector.SuggestBox.Overlay(); | 182 this._overlay = new WebInspector.SuggestBox.Overlay(); |
| 159 this._overlay.setContentElement(this._container); | 183 this._overlay.setContentElement(this._container); |
| 184 var measuringElement = this._createItemElement("1", "12"); | |
| 185 this._viewport.element.appendChild(measuringElement); | |
| 186 this._rowHeight = measuringElement.getBoundingClientRect().height; | |
| 187 measuringElement.remove(); | |
| 160 }, | 188 }, |
| 161 | 189 |
| 162 hide: function() | 190 hide: function() |
| 163 { | 191 { |
| 164 if (!this.visible()) | 192 if (!this.visible()) |
| 165 return; | 193 return; |
| 166 | 194 |
| 167 this._userInteracted = false; | 195 this._userInteracted = false; |
| 168 this._bodyElement.removeEventListener("mousedown", this._maybeHideBound, true); | 196 this._bodyElement.removeEventListener("mousedown", this._maybeHideBound, true); |
| 169 delete this._bodyElement; | 197 delete this._bodyElement; |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 249 _onItemMouseDown: function(event) | 277 _onItemMouseDown: function(event) |
| 250 { | 278 { |
| 251 this._selectedElement = event.currentTarget; | 279 this._selectedElement = event.currentTarget; |
| 252 this.acceptSuggestion(); | 280 this.acceptSuggestion(); |
| 253 event.consume(true); | 281 event.consume(true); |
| 254 }, | 282 }, |
| 255 | 283 |
| 256 /** | 284 /** |
| 257 * @param {string} prefix | 285 * @param {string} prefix |
| 258 * @param {string} text | 286 * @param {string} text |
| 259 * @param {string|undefined} className | 287 * @param {string=} className |
| 260 * @param {number} index | |
| 261 */ | 288 */ |
| 262 _createItemElement: function(prefix, text, className, index) | 289 _createItemElement: function(prefix, text, className) |
| 263 { | 290 { |
| 264 var element = createElementWithClass("div", "suggest-box-content-item so urce-code " + (className || "")); | 291 var element = createElementWithClass("div", "suggest-box-content-item so urce-code " + (className || "")); |
| 265 element.tabIndex = -1; | 292 element.tabIndex = -1; |
| 266 if (prefix && prefix.length && !text.indexOf(prefix)) { | 293 if (prefix && prefix.length && !text.indexOf(prefix)) { |
| 267 element.createChild("span", "prefix").textContent = prefix; | 294 element.createChild("span", "prefix").textContent = prefix; |
| 268 element.createChild("span", "suffix").textContent = text.substring(p refix.length).trimEnd(50); | 295 element.createChild("span", "suffix").textContent = text.substring(p refix.length).trimEnd(50); |
| 269 } else { | 296 } else { |
| 270 element.createChild("span", "suffix").textContent = text.trimEnd(50) ; | 297 element.createChild("span", "suffix").textContent = text.trimEnd(50) ; |
| 271 } | 298 } |
| 272 element.__fullValue = text; | 299 element.__fullValue = text; |
| 273 element.createChild("span", "spacer"); | 300 element.createChild("span", "spacer"); |
| 274 element.addEventListener("mousedown", this._onItemMouseDown.bind(this), false); | 301 element.addEventListener("mousedown", this._onItemMouseDown.bind(this), false); |
| 275 return element; | 302 return element; |
| 276 }, | 303 }, |
| 277 | 304 |
| 278 /** | 305 /** |
| 279 * @param {!WebInspector.SuggestBox.Suggestions} items | 306 * @param {!WebInspector.SuggestBox.Suggestions} items |
| 280 * @param {string} userEnteredText | 307 * @param {string} userEnteredText |
| 281 * @param {function(number): !Promise<{detail:string, description:string}>=} asyncDetails | 308 * @param {function(number): !Promise<{detail:string, description:string}>=} asyncDetails |
| 282 */ | 309 */ |
| 283 _updateItems: function(items, userEnteredText, asyncDetails) | 310 _updateItems: function(items, userEnteredText, asyncDetails) |
| 284 { | 311 { |
| 285 this._length = items.length; | 312 this._length = items.length; |
| 286 this._asyncDetailsPromises.clear(); | 313 this._asyncDetailsPromises.clear(); |
| 287 this._asyncDetailsCallback = asyncDetails; | 314 this._asyncDetailsCallback = asyncDetails; |
| 288 this._element.removeChildren(); | 315 this._elementList = []; |
| 289 delete this._selectedElement; | 316 delete this._selectedElement; |
| 290 | 317 |
| 291 for (var i = 0; i < items.length; ++i) { | 318 for (var i = 0; i < items.length; ++i) |
| 292 var item = items[i]; | 319 this._elementList.push(this._createItemElement(userEnteredText, item s[i].title, items[i].className)); |
| 293 var currentItemElement = this._createItemElement(userEnteredText, it em.title, item.className, i); | |
| 294 this._element.appendChild(currentItemElement); | |
| 295 } | |
| 296 }, | 320 }, |
| 297 | 321 |
| 298 /** | 322 /** |
| 299 * @param {number} index | 323 * @param {number} index |
| 300 * @return {!Promise<?{detail: string, description: string}>} | 324 * @return {!Promise<?{detail: string, description: string}>} |
| 301 */ | 325 */ |
| 302 _asyncDetails: function(index) | 326 _asyncDetails: function(index) |
| 303 { | 327 { |
| 304 if (!this._asyncDetailsCallback) | 328 if (!this._asyncDetailsCallback) |
| 305 return Promise.resolve(/** @type {?{description: string, detail: str ing}} */(null)); | 329 return Promise.resolve(/** @type {?{description: string, detail: str ing}} */(null)); |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 327 */ | 351 */ |
| 328 _selectItem: function(index, scrollIntoView) | 352 _selectItem: function(index, scrollIntoView) |
| 329 { | 353 { |
| 330 if (this._selectedElement) | 354 if (this._selectedElement) |
| 331 this._selectedElement.classList.remove("selected"); | 355 this._selectedElement.classList.remove("selected"); |
| 332 | 356 |
| 333 this._selectedIndex = index; | 357 this._selectedIndex = index; |
| 334 if (index < 0) | 358 if (index < 0) |
| 335 return; | 359 return; |
| 336 | 360 |
| 337 this._selectedElement = this._element.children[index]; | 361 this._selectedElement = this._elementList[index]; |
| 338 this._selectedElement.classList.add("selected"); | 362 this._selectedElement.classList.add("selected"); |
| 339 this._detailsPopup.classList.add("hidden"); | 363 this._detailsPopup.classList.add("hidden"); |
| 340 var elem = this._selectedElement; | 364 var elem = this._selectedElement; |
| 341 this._asyncDetails(index).then(showDetails.bind(this), function(){}); | 365 this._asyncDetails(index).then(showDetails.bind(this), function(){}); |
| 342 | 366 |
| 343 if (scrollIntoView) | 367 if (scrollIntoView) |
| 344 this._selectedElement.scrollIntoViewIfNeeded(false); | 368 this._viewport.scrollItemIntoView(index); |
| 345 | 369 |
| 346 /** | 370 /** |
| 347 * @param {?{detail: string, description: string}} details | 371 * @param {?{detail: string, description: string}} details |
| 348 * @this {WebInspector.SuggestBox} | 372 * @this {WebInspector.SuggestBox} |
| 349 */ | 373 */ |
| 350 function showDetails(details) | 374 function showDetails(details) |
| 351 { | 375 { |
| 352 if (elem === this._selectedElement) | 376 if (elem === this._selectedElement) |
| 353 this._showDetailsPopup(details); | 377 this._showDetailsPopup(details); |
| 354 } | 378 } |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 368 return true; | 392 return true; |
| 369 | 393 |
| 370 // Do not show a single suggestion if it is the same as user-entered pre fix, even if allowed to show single-item suggest boxes. | 394 // Do not show a single suggestion if it is the same as user-entered pre fix, even if allowed to show single-item suggest boxes. |
| 371 return canShowForSingleItem && completions[0].title !== userEnteredText; | 395 return canShowForSingleItem && completions[0].title !== userEnteredText; |
| 372 }, | 396 }, |
| 373 | 397 |
| 374 _ensureRowCountPerViewport: function() | 398 _ensureRowCountPerViewport: function() |
| 375 { | 399 { |
| 376 if (this._rowCountPerViewport) | 400 if (this._rowCountPerViewport) |
| 377 return; | 401 return; |
| 378 if (!this._element.firstChild) | 402 if (!this._elementList.length) |
| 379 return; | 403 return; |
| 380 | 404 |
| 381 this._rowCountPerViewport = Math.floor(this._element.offsetHeight / this ._element.firstChild.offsetHeight); | 405 this._rowCountPerViewport = Math.floor(this._element.getBoundingClientRe ct().height / this._rowHeight); |
| 382 }, | 406 }, |
| 383 | 407 |
| 384 /** | 408 /** |
| 385 * @param {!AnchorBox} anchorBox | 409 * @param {!AnchorBox} anchorBox |
| 386 * @param {!WebInspector.SuggestBox.Suggestions} completions | 410 * @param {!WebInspector.SuggestBox.Suggestions} completions |
| 387 * @param {number} selectedIndex | 411 * @param {number} selectedIndex |
| 388 * @param {boolean} canShowForSingleItem | 412 * @param {boolean} canShowForSingleItem |
| 389 * @param {string} userEnteredText | 413 * @param {string} userEnteredText |
| 390 * @param {function(number): !Promise<{detail:string, description:string}>=} asyncDetails | 414 * @param {function(number): !Promise<{detail:string, description:string}>=} asyncDetails |
| 391 */ | 415 */ |
| 392 updateSuggestions: function(anchorBox, completions, selectedIndex, canShowFo rSingleItem, userEnteredText, asyncDetails) | 416 updateSuggestions: function(anchorBox, completions, selectedIndex, canShowFo rSingleItem, userEnteredText, asyncDetails) |
| 393 { | 417 { |
| 394 delete this._onlyCompletion; | 418 delete this._onlyCompletion; |
| 395 if (this._canShowBox(completions, canShowForSingleItem, userEnteredText) ) { | 419 if (this._canShowBox(completions, canShowForSingleItem, userEnteredText) ) { |
| 396 this._updateItems(completions, userEnteredText, asyncDetails); | 420 this._updateItems(completions, userEnteredText, asyncDetails); |
| 397 this._show(); | 421 this._show(); |
| 398 this._updateBoxPosition(anchorBox); | 422 this._updateBoxPosition(anchorBox); |
| 423 this._updateWidth(); | |
| 424 this._viewport.refresh(); | |
| 399 this._selectItem(selectedIndex, selectedIndex > 0); | 425 this._selectItem(selectedIndex, selectedIndex > 0); |
| 400 delete this._rowCountPerViewport; | 426 delete this._rowCountPerViewport; |
| 401 } else { | 427 } else { |
| 402 if (completions.length === 1) | 428 if (completions.length === 1) |
| 403 this._onlyCompletion = completions[0].title; | 429 this._onlyCompletion = completions[0].title; |
| 404 this.hide(); | 430 this.hide(); |
| 405 } | 431 } |
| 406 }, | 432 }, |
| 407 | 433 |
| 408 /** | 434 /** |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 467 { | 493 { |
| 468 if (!this._userInteracted && this._captureEnter) | 494 if (!this._userInteracted && this._captureEnter) |
| 469 return false; | 495 return false; |
| 470 | 496 |
| 471 var hasSelectedItem = !!this._selectedElement || this._onlyCompletion; | 497 var hasSelectedItem = !!this._selectedElement || this._onlyCompletion; |
| 472 this.acceptSuggestion(); | 498 this.acceptSuggestion(); |
| 473 | 499 |
| 474 // Report the event as non-handled if there is no selected item, | 500 // Report the event as non-handled if there is no selected item, |
| 475 // to commit the input or handle it otherwise. | 501 // to commit the input or handle it otherwise. |
| 476 return hasSelectedItem; | 502 return hasSelectedItem; |
| 503 }, | |
| 504 | |
| 505 /** | |
| 506 * @override | |
| 507 * @param {number} index | |
| 508 * @return {number} | |
| 509 */ | |
| 510 fastItemHeight: function(index) | |
| 511 { | |
| 512 return this._rowHeight; | |
| 513 }, | |
| 514 | |
| 515 /** | |
| 516 * @override | |
| 517 * @return {number} | |
| 518 */ | |
| 519 itemCount: function() | |
| 520 { | |
| 521 return this._elementList.length; | |
| 522 }, | |
| 523 | |
| 524 /** | |
| 525 * @override | |
| 526 * @param {number} index | |
| 527 * @return {?Element} | |
| 528 */ | |
| 529 itemElement: function(index) | |
| 530 { | |
| 531 return this._elementList[index]; | |
| 477 } | 532 } |
| 478 } | 533 } |
| 479 | 534 |
| 480 /** | 535 /** |
| 481 * @constructor | 536 * @constructor |
| 482 * // FIXME: make SuggestBox work for multiple documents. | 537 * // FIXME: make SuggestBox work for multiple documents. |
| 483 * @suppressGlobalPropertiesCheck | 538 * @suppressGlobalPropertiesCheck |
| 484 */ | 539 */ |
| 485 WebInspector.SuggestBox.Overlay = function() | 540 WebInspector.SuggestBox.Overlay = function() |
| 486 { | 541 { |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 537 this.element.style.top = containerBox.y + "px"; | 592 this.element.style.top = containerBox.y + "px"; |
| 538 this.element.style.height = containerBox.height + "px"; | 593 this.element.style.height = containerBox.height + "px"; |
| 539 this.element.style.width = containerBox.width + "px"; | 594 this.element.style.width = containerBox.width + "px"; |
| 540 }, | 595 }, |
| 541 | 596 |
| 542 dispose: function() | 597 dispose: function() |
| 543 { | 598 { |
| 544 this.element.remove(); | 599 this.element.remove(); |
| 545 } | 600 } |
| 546 } | 601 } |
| OLD | NEW |