mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
Don't skip the resize if newWidth or newHeight is < 1 (#12002)
With full screen panel mode, the width and height can be updated to 0 (because the panel is hidden). If _size isn’t updated, the second time through it’ll skip the resize because of the if (newWidth === this._size[0] && newHeight === this._size[1]) Another option to fix this is to get rid of that check, and continue to do the resize when the _size values are equal. I felt this one was slightly better, but could go either way.
This commit is contained in:
parent
ee1178f2e4
commit
b8b597338e
1 changed files with 1 additions and 3 deletions
|
@ -76,9 +76,7 @@ class TagCloud extends EventEmitter {
|
|||
resize() {
|
||||
const newWidth = this._element.offsetWidth;
|
||||
const newHeight = this._element.offsetHeight;
|
||||
if (newWidth < 1 || newHeight < 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (newWidth === this._size[0] && newHeight === this._size[1]) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue