Skip to content

Commit

Permalink
[plugins] Change method "ShowButton".
Browse files Browse the repository at this point in the history
Add new parameter "align" for align button (avaliable "left" or "right").
  • Loading branch information
AlexeyMatveev686 authored and K0R0L committed Jul 20, 2023
1 parent 9489b01 commit 1b3599d
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions common/apiBase_plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -1594,18 +1594,19 @@
};

/**
* Shows or hides buttons in the header.
* @memberof Api
* @typeofeditors ["CDE", "CSE", "CPE"]
* @param {string} id - The button ID.
* @param {boolean} bShow - The flag specifies whether the button is shown (**true**) or hidden (**false**).
* @alias ShowButton
* @since 7.2.0
*/
Api.prototype["pluginMethod_ShowButton"] = function(id, bShow)
* Shows or hides buttons in the header.
* @memberof Api
* @typeofeditors ["CDE", "CSE", "CPE"]
* @param {string} id - The button ID.
* @param {boolean} bShow - The flag specifies whether the button is shown (**true**) or hidden (**false**).
* @param {string} align - The parameter indicates whether the button will be displayed on the right side of the window or on the left (*left* by default).
* @alias ShowButton
* @since 7.2.0
*/
Api.prototype["pluginMethod_ShowButton"] = function(id, bShow, align)
{
if (bShow) {
this.sendEvent("asc_onPluginShowButton", id);
this.sendEvent("asc_onPluginShowButton", id, (align === 'right'));
} else {
this.sendEvent("asc_onPluginHideButton", id);
}
Expand Down

0 comments on commit 1b3599d

Please sign in to comment.