define(["require", "exports", "@syncfusion/ej2-navigations", "../../../common/constant"], function (require, exports, ej2_navigations_1, constant_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var ToolbarRenderer = (function () {
function ToolbarRenderer(editor) {
this.editor = editor;
}
ToolbarRenderer.prototype.renderToolbar = function (args) {
this.element = typeof args.element === 'string'
? this.editor.element.querySelector(args.element)
: args.element;
return new ej2_navigations_1.Toolbar({
items: args.items,
width: args.width,
overflowMode: args.overflowMode,
locale: this.editor.locale,
cssClass: this.editor.cssClass,
enableRtl: this.editor.enableRtl,
enablePersistence: this.editor.enablePersistence,
clicked: this.handleInlineToolbarItemClick.bind(this),
created: this.handleInlineToolbarCreated.bind(this)
}, this.element);
};
ToolbarRenderer.prototype.handleInlineToolbarCreated = function (args) {
this.editor.notify(constant_1.events.inlineToolbarCreated, args);
};
ToolbarRenderer.prototype.handleInlineToolbarItemClick = function (args) {
this.editor.notify(constant_1.events.inlineToolbarItemClick, args);
};
return ToolbarRenderer;
}());
exports.ToolbarRenderer = ToolbarRenderer;
});
|