refactor widget constructor

This commit is contained in:
zadam
2019-08-17 10:45:20 +02:00
parent 723fc42d88
commit 53c4bb8a94
6 changed files with 15 additions and 32 deletions

View File

@@ -24,21 +24,15 @@ const linkOverlays = [
];
class LinkMapWidget extends StandardWidget {
/**
* @param {TabContext} ctx
* @param {object} state
*/
constructor(ctx, state) {
super(ctx, state);
this.$title.text("Link map");
getWidgetTitle() { return "Link map"; }
getHeaderActions() {
const $showFullButton = $("<a>").append("show full").addClass('widget-header-action');
$showFullButton.click(() => {
linkMapDialog.showDialog();
});
this.$headerActions.append($showFullButton);
return [$showFullButton];
}
async doRenderBody() {