Skip to content

Commit bd26897

Browse files
committed
remove workaround for vega height bug
Related to #31461
1 parent d56a0fa commit bd26897

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

src/plugins/vis_type_vega/public/__snapshots__/vega_visualization.test.js.snap

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/plugins/vis_type_vega/public/vega_view/vega_base_view.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -195,13 +195,9 @@ export class VegaBaseView {
195195
const width = Math.max(0, this._$container.width() - this._parser.paddingWidth);
196196
const height =
197197
Math.max(0, this._$container.height() - this._parser.paddingHeight) - heightExtraPadding;
198-
// Somehow the `height` signal in vega becomes zero if the height is set exactly to
199-
// an even number. This is a dirty workaround for this.
200-
// when vega itself is updated again, it should be checked whether this is still
201-
// necessary.
202-
const adjustedHeight = height + 0.00000001;
203-
if (view.width() !== width || view.height() !== adjustedHeight) {
204-
view.width(width).height(adjustedHeight);
198+
199+
if (view.width() !== width || view.height() !== height) {
200+
view.width(width).height(height);
205201
return true;
206202
}
207203
return false;

0 commit comments

Comments
 (0)