export hbox widget and mark parameter in getDOMNode() optional

This commit is contained in:
Ralf Becker 2021-05-21 12:23:16 +02:00
parent f113d9d880
commit 5e151a6210
2 changed files with 8 additions and 4 deletions

View File

@ -22,6 +22,7 @@ var __extends = (this && this.__extends) || (function () {
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.et2_hbox = void 0;
/*egw:uses
/vendor/bower-asset/jquery/dist/jquery.js;
et2_core_baseWidget;
@ -29,6 +30,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
var et2_core_inheritance_1 = require("./et2_core_inheritance");
var et2_core_widget_1 = require("./et2_core_widget");
var et2_core_baseWidget_1 = require("./et2_core_baseWidget");
var et2_widget_grid_1 = require("./et2_widget_grid");
/**
* Class which implements hbox tag
*
@ -162,11 +164,12 @@ var et2_hbox = /** @class */ (function (_super) {
*/
et2_hbox.prototype.addChild = function (child) {
_super.prototype.addChild.call(this, child);
if (child.instanceOf && child.instanceOf(et2_grid) && this.isAttached() || child._type == 'et2_grid' && this.isAttached()) {
if (child.instanceOf && child.instanceOf(et2_widget_grid_1.et2_grid) && this.isAttached() || child._type == 'et2_grid' && this.isAttached()) {
jQuery(child.getDOMNode(child)).css("display", "inline-table");
}
};
return et2_hbox;
}(et2_core_baseWidget_1.et2_baseWidget));
exports.et2_hbox = et2_hbox;
et2_core_widget_1.et2_register_widget(et2_hbox, ["hbox"]);
//# sourceMappingURL=et2_widget_hbox.js.map

View File

@ -14,15 +14,16 @@
*/
import {ClassWithAttributes} from "./et2_core_inheritance";
import {et2_register_widget, WidgetConfig} from "./et2_core_widget";
import {et2_register_widget, et2_widget, WidgetConfig} from "./et2_core_widget";
import {et2_baseWidget} from "./et2_core_baseWidget";
import {et2_grid} from "./et2_widget_grid";
/**
* Class which implements hbox tag
*
* @augments et2_baseWidget
*/
class et2_hbox extends et2_baseWidget
export class et2_hbox extends et2_baseWidget
{
alignData : any = {
"hasAlign": false,
@ -156,7 +157,7 @@ class et2_hbox extends et2_baseWidget
super.assign(_obj);
}
getDOMNode(_sender) {
getDOMNode(_sender? : et2_widget) {
// Return a special align container if this hbox needs it
if (_sender != this && this.alignData.hasAlign)
{