Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandr Evseev committed Oct 7, 2014
1 parent d8ddc80 commit 535a4b4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
20 changes: 11 additions & 9 deletions src/canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,17 +276,18 @@ canvas.renderers.container = function(element) {
};

/**
* Method to update applications and re-build layout.
* Canvas layout granular update logic without full refresh.
*
* This method initializes apps if its wasn't initialized before,
* re-initializes if app config were changed and destroys apps which
* are not presented in `apps` parameter anymore.
* This function performs the following actions:
*
* After apps updated it re-build layout and
* re-arrange apps according new layout.
* - inits an app if it was added to the Canvas
* - re-inits an app if the config of that app was changed
* - destroys an app in case it was deleted from a Canvas
* - re-arranges target elements in a Canvas if app locations/sizes
* were changed
*
* @param {Array} apps
* App list in the format used in Canvas storage.
* App list in the format used within the Canvas storage
*
* For example:
*
Expand All @@ -307,7 +308,7 @@ canvas.renderers.container = function(element) {
* }]
*
* @param {Array} layout
* Information about layout in the format used in Canvas storage.
* Layout configuration in the format used within the Canvas storage.
*
* For example:
*
Expand All @@ -317,7 +318,8 @@ canvas.renderers.container = function(element) {
* ]
*
* @return {jQuery Deferred's promise}
* Resolves when all apps are initialized and new layout built
* The Promise object resolves when all apps are initialized and new
* layout is built
*/
canvas.methods.updateLayout = function(apps, layout) {
var self = this;
Expand Down
5 changes: 2 additions & 3 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -1261,8 +1261,7 @@ Echo.Utils.random = function(min, max) {

/**
* @static
* Performs an deep comparison between the two objects
* to determine if they equivalent to each other.
* Performs deep comparison between two objects.
*
* var a = {"a": undefined, "b": 1, "c": {"d": true}, "e": ["f", "h"]};
* var b = {"a": undefined, "b": 1, "c": {"d": true}, "e": ["f", "h"]};
Expand All @@ -1283,7 +1282,7 @@ Echo.Utils.random = function(min, max) {
* Other object to compare
*
* @return {Boolean}
* Return true if objects are equal.
* Returns true if objects are equal.
*/
Echo.Utils.deepEqual = function(a, b) {
var aParents = [], bParents = [];
Expand Down

0 comments on commit 535a4b4

Please sign in to comment.