|
22 | 22 | var DOM;
|
23 | 23 |
|
24 | 24 | var constants, windowLevels, screenLevels;
|
25 |
| - var CB_EXECUTED, WIN_LOADING, lockedUpdate; |
| 25 | + var CB_EXECUTED, WIN_LOADING; |
26 | 26 |
|
27 | 27 | if (!J) throw new Error('GameWindow: JSUS not found');
|
28 | 28 | DOM = J.require('DOM');
|
|
36 | 36 |
|
37 | 37 | WIN_LOADING = windowLevels.LOADING;
|
38 | 38 |
|
39 |
| - // Allows just one update at the time to the counter of loading frames. |
40 |
| - lockedUpdate = false; |
41 |
| - |
42 | 39 | GameWindow.prototype = DOM;
|
43 | 40 | GameWindow.prototype.constructor = GameWindow;
|
44 | 41 |
|
|
62 | 59 | var iframeWin;
|
63 | 60 | iframeWin = iframe.contentWindow;
|
64 | 61 |
|
65 |
| - function completed(event) { |
66 |
| - var iframeDoc; |
67 |
| - iframeDoc = J.getIFrameDocument(iframe); |
68 |
| - |
| 62 | + function completed() { |
69 | 63 | // Detaching the function to avoid double execution.
|
70 | 64 | iframe.removeEventListener('load', completed, false);
|
71 | 65 | iframeWin.removeEventListener('load', completed, false);
|
|
853 | 847 | *
|
854 | 848 | * Appends a configurable div element at to "top" of the page
|
855 | 849 | *
|
856 |
| - * @param {object} opts Optional. Configuration options: TODO |
| 850 | + * @param {object} opts Optional. Configuration options: |
857 | 851 | *
|
858 |
| - * - toggleBtn |
859 |
| - * - toggleBtnLabel |
860 |
| - * - toggleBtnRoot: |
861 |
| - * - force: destroys current Info Panel |
| 852 | + * - root: The HTML element (or its id) under which the Info Panel |
| 853 | + * will be appended. Default: above the main frame, or below the |
| 854 | + * the header, or under document.body. |
| 855 | + * - innerHTML: the content of the Info Panel. |
| 856 | + * - force: It destroys current frame, if existing. |
| 857 | + * - toggleBtn: If TRUE, it creates a button to toggle the Info Panel. |
| 858 | + * Default: TRUE. |
| 859 | + * - toggleBtnRoot: the HTML element (or its id) under which the button |
| 860 | + * to toggle the Info Panel will be appended. Default: the header. |
| 861 | + * - toggleBtnLabel: The text on the button to toggle the Info Panel. |
| 862 | + * Default: 'Info'. |
862 | 863 | *
|
863 |
| - * @param {boolean} force Optional. Will create the frame even if an |
864 |
| - * existing one is found. Deprecated, use force flag in options. |
865 |
| - * Default: FALSE |
| 864 | + * @param {boolean} force Optional. Deprecated, use force flag in |
| 865 | + * options. Default: FALSE |
866 | 866 | *
|
867 | 867 | * @return {InfoPanel} A reference to the InfoPanel object
|
868 | 868 | *
|
|
898 | 898 |
|
899 | 899 | root = opts.root;
|
900 | 900 | if (root) {
|
| 901 | + if ('string' === typeof root) root = W.gid(root); |
901 | 902 | if (!J.isElement(root)) {
|
902 | 903 | throw new Error('GameWindow.generateInfoPanel: root must be ' +
|
903 | 904 | 'undefined or HTMLElement. Found: ' + root);
|
|
2365 | 2366 | * @param {GameWindow} that A reference to the GameWindow instance
|
2366 | 2367 | * @param {number} update The number to add to the counter
|
2367 | 2368 | *
|
2368 |
| - * @see GameWindow.lockedUpdate |
2369 |
| - * |
2370 | 2369 | * @api private
|
2371 | 2370 | */
|
2372 | 2371 | function updateAreLoading(that, update) {
|
|
0 commit comments