define(["require", "exports", "@syncfusion/ej2-popups", "../base/classes", "../base/constant"], function (require, exports, ej2_popups_1, classes_1, events) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var PopupRenderer = (function () {
function PopupRenderer(parent) {
this.parent = parent;
}
PopupRenderer.prototype.quickToolbarOpen = function () {
var args = this.popupObj;
this.parent.trigger(events.quickToolbarOpen, args);
};
PopupRenderer.prototype.renderPopup = function (args) {
this.setPanel(args.element);
this.renderPanel();
args.popupObj = new ej2_popups_1.Popup(args.element, {
targetType: 'relative',
relateTo: this.parent.element,
open: this.quickToolbarOpen.bind(this)
});
this.popupObj = args.popupObj;
args.popupObj.hide();
};
PopupRenderer.prototype.renderPanel = function () {
this.getPanel().classList.add(classes_1.CLS_QUICK_POP);
};
PopupRenderer.prototype.getPanel = function () {
return this.popupPanel;
};
PopupRenderer.prototype.setPanel = function (panel) {
this.popupPanel = panel;
};
return PopupRenderer;
}());
exports.PopupRenderer = PopupRenderer;
});
|