Skip to content

Commit

Permalink
fixed for api docs (#3040)
Browse files Browse the repository at this point in the history
  • Loading branch information
ovchinnikova-natalya authored Oct 14, 2022
1 parent db6a5dc commit 3547d2a
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 8 deletions.
29 changes: 26 additions & 3 deletions cell/apiBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,16 @@
* @property {Array} Sheets - Returns the Sheets collection that represents all the sheets in the active workbook.
* @property {ApiWorksheet} ActiveSheet - Returns an object that represents the active sheet.
* @property {ApiRange} Selection - Returns an object that represents the selected range.
* @event onWorksheetChange - Calls the callback function when the specified range of the current sheet changes.
* It is called with the *range* parameter which specifies the modified range represented as the ApiRange object.
* <note>Please note that the event is not called for the undo/redo operations.</note>
*/
var Api = window["Asc"]["spreadsheet_api"];

/**
* The callback function which is called when the specified range of the current sheet changes.
* <note>Please note that the event is not called for the undo/redo operations.</note>
* @event Api#onWorksheetChange
* @property {ApiRange} range - The modified range represented as the ApiRange object.
*/

/**
* Class representing a sheet.
* @constructor
Expand Down Expand Up @@ -755,6 +759,25 @@
}
};

/**
* Subscribes to the specified event and calls the callback function when the event fires.
* @memberof Api
* @typeofeditors ["CSE"]
* @param {string} eventName - The event name.
* @param {function} callback - Function to be called when the event fires.
* @fires Api#onWorksheetChange
*/
Api.prototype["attachEvent"] = Api.prototype.attachEvent;

/**
* Unsubscribes from the specified event.
* @memberof Api
* @typeofeditors ["CSE"]
* @param {string} eventName - The event name.
* @fires Api#onWorksheetChange
*/
Api.prototype["detachEvent"] = Api.prototype.detachEvent;

/**
* Returns the state of sheet visibility.
* @memberof ApiWorksheet
Expand Down
2 changes: 1 addition & 1 deletion common/apiBase_plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -1260,7 +1260,7 @@
* @memberof Api
* @typeofeditors ["CDE", "CSE", "CPE"]
* @alias GetInstalledPlugins
* @returns {[]} - Array of all installed plugins.
* @returns {object[]} - Array of all installed plugins.
*/
Api.prototype["pluginMethod_GetInstalledPlugins"] = function()
{
Expand Down
18 changes: 18 additions & 0 deletions slide/apiBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -1031,6 +1031,24 @@
oReader.AssignConnectedObjects();
return oResult;
};

/**
* Subscribes to the specified event and calls the callback function when the event fires.
* @memberof Api
* @typeofeditors ["CPE"]
* @param {string} eventName - The event name.
* @param {function} callback - Function to be called when the event fires.
*/
Api.prototype["attachEvent"] = Api.prototype.attachEvent;

/**
* Unsubscribes from the specified event.
* @memberof Api
* @typeofeditors ["CPE"]
* @param {string} eventName - The event name.
*/
Api.prototype["detachEvent"] = Api.prototype.detachEvent;

//------------------------------------------------------------------------------------------------------------------
//
// ApiPresentation
Expand Down
4 changes: 2 additions & 2 deletions word/apiBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -4780,7 +4780,7 @@
/**
* Subscribes to the specified event and calls the callback function when the event fires.
* @memberof Api
* @typeofeditors ["CDE", "CSE", "CPE"]
* @typeofeditors ["CDE"]
* @param {string} eventName - The event name.
* @param {function} callback - Function to be called when the event fires.
*/
Expand All @@ -4789,7 +4789,7 @@
/**
* Unsubscribes from the specified event.
* @memberof Api
* @typeofeditors ["CDE", "CSE", "CPE"]
* @typeofeditors ["CDE"]
* @param {string} eventName - The event name.
*/
Api.prototype["detachEvent"] = Api.prototype.detachEvent;
Expand Down
4 changes: 2 additions & 2 deletions word/api_plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@
* @memberof Api
* @typeofeditors ["CDE"]
* @alias GetAllComments
* @returns {[]} - An array which contains all the comments from the document.
* @returns {object[]} - An array which contains all the comments from the document.
*/
window["asc_docs_api"].prototype["pluginMethod_GetAllComments"] = function()
{
Expand Down Expand Up @@ -620,7 +620,7 @@
* @typeofeditors ["CDE"]
* @alias AddContentControlList
* @param {ContentControlType} type - A numeric value that specifies the content control type. It can have one of the following values: 1 (comboBox) or 0 (drop-down list).
* @param {Array[{String, String}]} [List = [{Display, Value}]] - A list of the content control elements that consists of two items: "Display" - an item that will be displayed to the user in the content control list, "Value" - a value of each item from the content control list.
* @param {Array<String, String>} [List = [{Display, Value}]] - A list of the content control elements that consists of two items: "Display" - an item that will be displayed to the user in the content control list, "Value" - a value of each item from the content control list.
* @param {ContentControlProperties} [commonPr = {}] - The common content control properties.
* @return {undefined}
* @example
Expand Down

0 comments on commit 3547d2a

Please sign in to comment.