From 9b15437ff6dff8abaa53c0139292be69afc91e2a Mon Sep 17 00:00:00 2001 From: zadam Date: Sun, 26 Jul 2020 00:09:53 +0200 Subject: [PATCH] attr detail sizing --- src/public/app/widgets/attribute_detail.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/public/app/widgets/attribute_detail.js b/src/public/app/widgets/attribute_detail.js index 697414d66..6ca25f6e1 100644 --- a/src/public/app/widgets/attribute_detail.js +++ b/src/public/app/widgets/attribute_detail.js @@ -360,6 +360,12 @@ export default class AttributeDetailWidget extends BasicWidget { this.$widget.css("left", x - this.$widget.outerWidth() / 2); this.$widget.css("top", y + 25); + + // so that the detail window always fits + this.$widget.css("max-height", + this.$widget.outerHeight() + y > $(window).height() - 50 + ? $(window).height() - y - 50 + : 10000); } getAttrType(attribute) {