jclic 2.1.21 → 2.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/jclic-node.js +9 -8
- package/dist/jclic-node.js.map +1 -1
- package/dist/jclic.min.js +2 -2
- package/dist/jclic.min.js.map +1 -1
- package/package.json +4 -4
- package/src/GlobalData.js +1 -1
- package/src/JClicPlayer.js +2 -2
- package/src/bags/MediaBag.js +6 -5
- package/dist/1078.jclic-node.js +0 -282
- package/dist/1078.jclic-node.js.map +0 -1
- package/dist/1196.jclic-node.js +0 -808
- package/dist/1196.jclic-node.js.map +0 -1
- package/dist/1253.jclic-node.js +0 -1432
- package/dist/1253.jclic-node.js.map +0 -1
- package/dist/13.jclic-node.js +0 -103
- package/dist/13.jclic-node.js.map +0 -1
- package/dist/1567.jclic-node.js +0 -2313
- package/dist/1567.jclic-node.js.map +0 -1
- package/dist/1588.jclic-node.js +0 -602
- package/dist/1588.jclic-node.js.map +0 -1
- package/dist/1725.jclic-node.js +0 -836
- package/dist/1725.jclic-node.js.map +0 -1
- package/dist/1731.jclic-node.js +0 -438
- package/dist/1731.jclic-node.js.map +0 -1
- package/dist/1842.jclic-node.js +0 -651
- package/dist/1842.jclic-node.js.map +0 -1
- package/dist/2160.jclic-node.js +0 -1016
- package/dist/2160.jclic-node.js.map +0 -1
- package/dist/222.jclic-node.js +0 -129
- package/dist/222.jclic-node.js.map +0 -1
- package/dist/2316.jclic-node.js +0 -949
- package/dist/2316.jclic-node.js.map +0 -1
- package/dist/2355.jclic-node.js +0 -371
- package/dist/2355.jclic-node.js.map +0 -1
- package/dist/2366.jclic-node.js +0 -431
- package/dist/2366.jclic-node.js.map +0 -1
- package/dist/2379.jclic-node.js +0 -202
- package/dist/2379.jclic-node.js.map +0 -1
- package/dist/2437.jclic-node.js +0 -450
- package/dist/2437.jclic-node.js.map +0 -1
- package/dist/2531.jclic-node.js +0 -869
- package/dist/2531.jclic-node.js.map +0 -1
- package/dist/2608.jclic-node.js +0 -160
- package/dist/2608.jclic-node.js.map +0 -1
- package/dist/2715.jclic-node.js +0 -554
- package/dist/2715.jclic-node.js.map +0 -1
- package/dist/277.jclic-node.js +0 -22
- package/dist/277.jclic-node.js.map +0 -1
- package/dist/2921.jclic-node.js +0 -660
- package/dist/2921.jclic-node.js.map +0 -1
- package/dist/2952.jclic-node.js +0 -101
- package/dist/2952.jclic-node.js.map +0 -1
- package/dist/3018.jclic-node.js +0 -421
- package/dist/3018.jclic-node.js.map +0 -1
- package/dist/3019.jclic-node.js +0 -682
- package/dist/3019.jclic-node.js.map +0 -1
- package/dist/3231.jclic-node.js +0 -274
- package/dist/3231.jclic-node.js.map +0 -1
- package/dist/331.jclic-node.js +0 -115
- package/dist/331.jclic-node.js.map +0 -1
- package/dist/3391.jclic-node.js +0 -276
- package/dist/3391.jclic-node.js.map +0 -1
- package/dist/3502.jclic-node.js +0 -671
- package/dist/3502.jclic-node.js.map +0 -1
- package/dist/3653.jclic-node.js +0 -982
- package/dist/3653.jclic-node.js.map +0 -1
- package/dist/371.jclic.min.js +0 -2
- package/dist/371.jclic.min.js.map +0 -1
- package/dist/3856.jclic-node.js +0 -575
- package/dist/3856.jclic-node.js.map +0 -1
- package/dist/4112.jclic-node.js +0 -659
- package/dist/4112.jclic-node.js.map +0 -1
- package/dist/4123.jclic-node.js +0 -910
- package/dist/4123.jclic-node.js.map +0 -1
- package/dist/427.jclic-node.js +0 -894
- package/dist/427.jclic-node.js.map +0 -1
- package/dist/4483.jclic-node.js +0 -327
- package/dist/4483.jclic-node.js.map +0 -1
- package/dist/4548.jclic-node.js +0 -1078
- package/dist/4548.jclic-node.js.map +0 -1
- package/dist/466.jclic-node.js +0 -99
- package/dist/466.jclic-node.js.map +0 -1
- package/dist/485.jclic-node.js +0 -783
- package/dist/485.jclic-node.js.map +0 -1
- package/dist/4921.jclic-node.js +0 -500
- package/dist/4921.jclic-node.js.map +0 -1
- package/dist/5091.jclic-node.js +0 -239
- package/dist/5091.jclic-node.js.map +0 -1
- package/dist/520.jclic-node.js +0 -550
- package/dist/520.jclic-node.js.map +0 -1
- package/dist/5312.jclic-node.js +0 -1126
- package/dist/5312.jclic-node.js.map +0 -1
- package/dist/5338.jclic-node.js +0 -212
- package/dist/5338.jclic-node.js.map +0 -1
- package/dist/5344.jclic-node.js +0 -229
- package/dist/5344.jclic-node.js.map +0 -1
- package/dist/5550.jclic-node.js +0 -238
- package/dist/5550.jclic-node.js.map +0 -1
- package/dist/5626.jclic-node.js +0 -614
- package/dist/5626.jclic-node.js.map +0 -1
- package/dist/5977.jclic-node.js +0 -1081
- package/dist/5977.jclic-node.js.map +0 -1
- package/dist/6148.jclic-node.js +0 -345
- package/dist/6148.jclic-node.js.map +0 -1
- package/dist/6176.jclic-node.js +0 -481
- package/dist/6176.jclic-node.js.map +0 -1
- package/dist/6221.jclic-node.js +0 -1072
- package/dist/6221.jclic-node.js.map +0 -1
- package/dist/6238.jclic-node.js +0 -718
- package/dist/6238.jclic-node.js.map +0 -1
- package/dist/6454.jclic-node.js +0 -1413
- package/dist/6454.jclic-node.js.map +0 -1
- package/dist/6565.jclic-node.js +0 -294
- package/dist/6565.jclic-node.js.map +0 -1
- package/dist/6579.jclic-node.js +0 -719
- package/dist/6579.jclic-node.js.map +0 -1
- package/dist/6715.jclic-node.js +0 -148
- package/dist/6715.jclic-node.js.map +0 -1
- package/dist/6777.jclic-node.js +0 -171
- package/dist/6777.jclic-node.js.map +0 -1
- package/dist/6782.jclic-node.js +0 -1611
- package/dist/6782.jclic-node.js.map +0 -1
- package/dist/6847.jclic-node.js +0 -601
- package/dist/6847.jclic-node.js.map +0 -1
- package/dist/6856.jclic-node.js +0 -252
- package/dist/6856.jclic-node.js.map +0 -1
- package/dist/696.jclic-node.js +0 -1821
- package/dist/696.jclic-node.js.map +0 -1
- package/dist/698.jclic-node.js +0 -583
- package/dist/698.jclic-node.js.map +0 -1
- package/dist/704.jclic-node.js +0 -80
- package/dist/704.jclic-node.js.map +0 -1
- package/dist/7046.jclic-node.js +0 -735
- package/dist/7046.jclic-node.js.map +0 -1
- package/dist/7220.jclic-node.js +0 -156
- package/dist/7220.jclic-node.js.map +0 -1
- package/dist/7257.jclic-node.js +0 -931
- package/dist/7257.jclic-node.js.map +0 -1
- package/dist/743.jclic-node.js +0 -583
- package/dist/743.jclic-node.js.map +0 -1
- package/dist/757.jclic-node.js +0 -1072
- package/dist/757.jclic-node.js.map +0 -1
- package/dist/7781.jclic-node.js +0 -202
- package/dist/7781.jclic-node.js.map +0 -1
- package/dist/7912.jclic-node.js +0 -2103
- package/dist/7912.jclic-node.js.map +0 -1
- package/dist/827.jclic-node.js +0 -708
- package/dist/827.jclic-node.js.map +0 -1
- package/dist/8276.jclic-node.js +0 -409
- package/dist/8276.jclic-node.js.map +0 -1
- package/dist/8322.jclic-node.js +0 -498
- package/dist/8322.jclic-node.js.map +0 -1
- package/dist/8641.jclic-node.js +0 -360
- package/dist/8641.jclic-node.js.map +0 -1
- package/dist/8837.jclic-node.js +0 -651
- package/dist/8837.jclic-node.js.map +0 -1
- package/dist/8895.jclic-node.js +0 -151
- package/dist/8895.jclic-node.js.map +0 -1
- package/dist/9072.jclic-node.js +0 -1285
- package/dist/9072.jclic-node.js.map +0 -1
- package/dist/9078.jclic-node.js +0 -935
- package/dist/9078.jclic-node.js.map +0 -1
- package/dist/9103.jclic-node.js +0 -718
- package/dist/9103.jclic-node.js.map +0 -1
- package/dist/9359.jclic-node.js +0 -145
- package/dist/9359.jclic-node.js.map +0 -1
- package/dist/9409.jclic-node.js +0 -921
- package/dist/9409.jclic-node.js.map +0 -1
- package/dist/9513.jclic-node.js +0 -720
- package/dist/9513.jclic-node.js.map +0 -1
- package/dist/9704.jclic-node.js +0 -81
- package/dist/9704.jclic-node.js.map +0 -1
- package/dist/9950.jclic-node.js +0 -827
- package/dist/9950.jclic-node.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"757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;AACb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,wCAAwC;AACxC;AACA,aAAa,sBAAsB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,IAAI,8BAAM;AACV;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA,6BAA6B,iBAAiB;AAC9C;AACA;AACA;AACA,gDAAgD,oBAAoB;AACpE;AACA;AACA;AACA,MAAM,qBAAG,uBAAuB,qBAAqB,GAAG,iBAAiB;AACzE;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,SAAS;AACtB,aAAa,QAAQ;AACrB;AACA;AACA,eAAe,kBAAkB;AACjC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+BAA+B,iBAAiB;AAChD;AACA;AACA;AACA;AACA,6BAA6B,oBAAoB;AACjD,KAAK;AACL;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,iCAAiC;AAC9C,eAAe,kBAAkB,2BAA2B,qCAAqC;AACjG;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,aAAa,iCAAiC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S;AACxB;;AAEA;AACA;AACA,MAAM,mEAAmE;AACzE,aAAa,SAAS;AACtB;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,mBAAmB;AAChC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,wBAAwB;AACrC,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,kDAAkD;AACjE,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,aAAa;AACb;AACA;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY,kCAAkC;AAC9C;AACA;AACA;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACA;AACA,iBAAiB,sDAAsD;AACvE;AACA,YAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,UAAU,kDAAkD;AAC5D;AACA,YAAY,gCAAgC;AAC5C;AACA;AACA,UAAU;AACV;AACA;AACA,YAAY,gCAAgC;AAC5C;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,UAAU;AACV;AACA;AACA;AACA,YAAY,QAAQ;AACpB,aAAa;AACb;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY;AACZ;AACA;AACA;AACA,YAAY,QAAQ;AACpB,cAAc;AACd;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,iBAAiB;AACjB;AACA;AACA;AACA,YAAY,QAAQ;AACpB,cAAc;AACd;AACA;AACA;AACA,YAAY,QAAQ;AACpB,UAAU;AACV;AACA;AACA;AACA,YAAY,QAAQ;AACpB,SAAS;AACT;AACA;AACA;AACA,YAAY,QAAQ;AACpB,eAAe,yBAAyB;AACxC;AACA;AACA;AACA,YAAY,QAAQ;AACpB,oBAAoB,yBAAyB;AAC7C,CAAC;;AAED,iDAAe,IAAI,EAAC","sources":["webpack://jclic/./src/skins/Skin.js"],"sourcesContent":["/**\n * File : skins/Skin.js\n * Created : 29/04/2015\n * By : Francesc Busquets <francesc@gmail.com>\n *\n * JClic.js\n * An HTML5 player of JClic activities\n * https://projectestac.github.io/jclic.js\n *\n * @source https://github.com/projectestac/jclic.js\n *\n * @license EUPL-1.2\n * @licstart\n * (c) 2000-2020 Educational Telematic Network of Catalonia (XTEC)\n *\n * Licensed under the EUPL, Version 1.1 or -as soon they will be approved by\n * the European Commission- subsequent versions of the EUPL (the \"Licence\");\n * You may not use this work except in compliance with the Licence.\n *\n * You may obtain a copy of the Licence at:\n * https://joinup.ec.europa.eu/software/page/eupl\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the Licence is distributed on an \"AS IS\" basis, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n * Licence for the specific language governing permissions and limitations\n * under the Licence.\n * @licend\n * @module\n */\n\n/* global Promise, window, document, navigator, ClipboardItem, Blob */\n\nimport $ from 'jquery';\nimport { appendStyleAtHead, cloneObject, getMsg, setLogLevel, log, getRootHead, toCssSize, $HTML, getPercent, getHMStime, settings } from '../Utils.js';\nimport { Container, Dimension, Rectangle } from '../AWT.js';\n\n// Use Webpack to import CSS and SVG files\nimport basicCSS from './assets/basic.css';\nimport waitAnimCSS from './assets/waitAnim.css';\nimport reportsCSS from './assets/reports.css';\nimport waitImgSmall from './assets/waitImgSmall.svg';\nimport waitImgBig from './assets/waitImgBig.svg';\nimport appLogo from './assets/appLogo.svg';\nimport closeDialogIcon from './assets/closeDialogIcon.svg';\nimport okDialogIcon from './assets/okDialogIcon.svg';\nimport copyIcon from './assets/copyIcon.svg';\n\n/**\n * This abstract class manages the layout, position ans size of the visual components of JClic:\n * player window, message box, counters, buttons, status... and also the appearance of the main\n * container.\n * The basic implementation of Skin is {@link module:skins/DefaultSkin.DefaultSkin DefaultSkin}.\n * @abstract\n * @extends module:AWT.Container\n */\nexport class Skin extends Container {\n /**\n * Skin constructor\n * @param {module:JClicPlayer.JClicPlayer} ps - The `PlayStation` (currently a {@link module:JClicPlayer.JClicPlayer JClicPlayer}) used to load and\n * realize the media objects needed tot build the Skin.\n * @param {string} [name] - The skin name\n * @param {object} [options] - Optional parameter with additional options\n */\n constructor(ps, name = null, options = {}) {\n\n // Skin extends [AWT.Container](AWT.html)\n super();\n\n // Save parameters for later use\n this.ps = ps;\n if (name !== null)\n this.name = name;\n this.options = options;\n\n if (this.options.skinId)\n this.skinId = this.options.skinId;\n\n if (!Skin.registerStyleSheet(this.skinId, ps)) {\n let css = this._getStyleSheets('default');\n let twoThirds = this._getStyleSheets('twoThirds');\n if (twoThirds.length > 0)\n css += ` @media (max-width:${this.twoThirdsMedia.width}px),(max-height:${this.twoThirdsMedia.height}px){${twoThirds}}`;\n let half = this._getStyleSheets('half');\n if (half.length > 0)\n css += ` @media (max-width:${this.halfMedia.width}px),(max-height:${this.halfMedia.height}px){${half}}`;\n appendStyleAtHead(css.replace(/\\.ID/g, `.${this.skinId}`), ps);\n }\n\n let msg = '';\n\n this.$div = $('<div/>', { class: this.skinId });\n this.$playerCnt = $('<div/>', { class: 'JClicPlayerCnt' });\n\n // Add waiting panel and progress bar\n this.$progress = $('<progress/>', { class: 'progressBar' })\n .css({ display: 'none' });\n this.$waitPanel = $('<div/>')\n .css({ display: 'none', 'background-color': 'rgba(255, 255, 255, .60)', 'z-index': 99 })\n .append($('<div/>', { class: 'waitPanel' }).css({ display: 'flex', 'flex-direction': 'column' })\n .append($('<div/>', { class: 'animImgBox' })\n .append($(this.waitImgBig), $(this.waitImgSmall)))\n .append(this.$progress));\n this.$playerCnt.append(this.$waitPanel);\n\n this.buttons = cloneObject(Skin.prototype.buttons);\n this.counters = cloneObject(Skin.prototype.counters);\n this.msgArea = cloneObject(Skin.prototype.msgArea);\n\n // Create dialog overlay and panel\n this.$dlgOverlay = $('<div/>', { class: 'dlgOverlay' }).css({\n 'z-index': 98,\n position: 'fixed',\n left: 0,\n top: 0,\n width: '100%',\n height: '100%',\n display: 'none',\n 'background-color': 'rgba(30,30,30,0.7)'\n }).on('click', () => {\n if (!this._isModalDlg)\n // Non-modal dialogs are closed on click outside the main area\n this._closeDlg(true);\n return false;\n });\n\n const $dlgDiv = $('<div/>', {\n class: 'dlgDiv',\n role: 'dialog',\n 'aria-labelledby': ps.getUniqueId('ReportsLb'),\n 'aria-describedby': ps.getUniqueId('ReportsCnt')\n }).css({\n display: 'inline-block',\n position: 'relative',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)'\n }).on('click', () => {\n // Clicks not passed to parent\n return false;\n });\n\n this.$dlgMainPanel = $('<div/>', { class: 'dlgMainPanel', id: ps.getUniqueId('ReportsCnt') });\n this.$dlgBottomPanel = $('<div/>', { class: 'dlgBottomPanel', role: 'navigation' });\n\n // Basic dialog structure:\n this.$div.append(\n this.$playerCnt,\n this.$dlgOverlay.append(\n $dlgDiv.append(\n this.$dlgMainPanel,\n this.$dlgBottomPanel)));\n\n msg = getMsg('JClic logo');\n this.$infoHead = $('<div/>', { class: 'infoHead' })\n .append($('<div/>', { class: 'headTitle unselectableText' })\n .append($(this.appLogo, { 'aria-label': msg }).css({ width: '1.5em', height: '1.5em', 'vertical-align': 'bottom' })\n .on('dblclick', () => {\n // Double click on JClic logo is a hidden method to increase verbosity on Javascript console\n setLogLevel('all');\n log('trace', 'Log level set to \"trace\"');\n }))\n .append($('<span/>').html('JClic.js')))\n .append($('<p/>').css({ 'margin-top': 0, 'margin-left': '3.5em' })\n .append($('<a/>', { href: 'https://projectes.xtec.cat/clic/' }).html('https://projectes.xtec.cat/clic/'))\n .append($('<br>'))\n .append($('<span/>').html(`${getMsg('Version')} ${settings.VERSION}`)));\n\n this.$reportsPanel = $('<div/>', { class: 'reportsPanel', role: 'document' });\n\n msg = getMsg('Copy data to clipboard');\n this.$copyBtn = $('<button/>', { title: msg, 'aria-label': msg })\n .append($(this.copyIcon).css({ width: '26px', height: '26px' }))\n .on('click', () => {\n const item = new ClipboardItem({\n 'text/plain': new Blob([`===> ${getMsg('The data has been copied in HTML format. Please paste them into a spreadsheet or in a rich text editor')} <===`], {type: 'text/plain'}),\n 'text/html': new Blob([this.$reportsPanel.html()], {type: 'text/html'}),\n });\n navigator.clipboard.write([item])\n .then(() => this.$copyBtn.parent().append(\n $('<div/>', { class: 'smallPopup' })\n .html(getMsg('The data has been copied to clipboard'))\n .fadeIn()\n .delay(3000)\n .fadeOut(function () { $(this).remove(); })))\n .catch(err => this.$copyBtn.parent().append(\n $('<div/>', { class: 'smallPopup' })\n .html(`ERROR: Unable to write data into the clipboard: ${err}`)\n .fadeIn()\n .delay(3000)\n .fadeOut(function () { $(this).remove(); })));\n });\n\n msg = getMsg('Close');\n this.$closeDlgBtn = $('<button/>', { title: msg, 'aria-label': msg })\n .append($(this.closeDialogIcon).css({ width: '26px', height: '26px' }))\n .on('click', () => this._closeDlg(true));\n\n msg = getMsg('OK');\n this.$okDlgBtn = $('<button/>', { title: msg, 'aria-label': msg })\n .append($(this.okDialogIcon).css({ width: '26px', height: '26px' }))\n .on('click', () => this._closeDlg(true));\n\n msg = getMsg('Cancel');\n this.$cancelDlgBtn = $('<button/>', { title: msg, 'aria-label': msg })\n .append($(this.closeDialogIcon).css({ width: '26px', height: '26px' }))\n .on('click', () => this._closeDlg(false));\n\n // Registers this Skin in the list of realized Skin objects\n Skin.skinStack.push(this);\n }\n\n /**\n * Registers a new type of skin\n * @param {string} skinName - The name used to identify this skin\n * @param {function} skinClass - The skin class, usually extending Skin\n * @returns {module:skins/Skin.Skin} - The provided skin class\n */\n static registerClass(skinName, skinClass) {\n Skin.CLASSES[skinName] = skinClass;\n return skinClass;\n }\n\n /**\n * Checks if the provided stylesheet ID is already registered in the root node where the current player is placed\n * @param {string} skinId - The unique identifier of the skin to check\n * @param {module:JClicPlayer.JClicPlayer} [ps] - An optional `PlayStation` (currently a {@link module:JClicPlayer.JClicPlayer JClicPlayer}) used as a base to find the root node\n * @returns {boolean} - _true_ when the skin stylesheet is already defined in the current root node, _false_ otherwise\n */\n static registerStyleSheet(skinId, ps) {\n let result = false;\n const root = getRootHead(ps);\n if (!root['__JClicID'])\n root.__JClicID = `SK${Skin.lastId++}`;\n\n let styles = Skin.rootStyles[root.__JClicID];\n if (!styles) {\n styles = [];\n Skin.rootStyles[root.__JClicID] = styles;\n }\n\n if (styles.indexOf(skinId) < 0) {\n log('trace', `Stylesheet \"${skinId}\" has been registered for root node labeled as \"${root.__JClicID}\"`);\n styles.push(skinId);\n } else\n result = true;\n\n return result;\n }\n\n /**\n * Gets the specified Skin from `skinStack`, or creates a new one if not found.\n * This function should be used only through `Skin.getSkin`\n * @param {string} skinName - The name of the searched skin\n * @param {module:JClicPlayer.JClicPlayer} ps - The PlayStation (usually a {@link module:JClicPlayer.JClicPlayer JClicPlayer}) used to build the new skin.\n * @param {object} [options] - Optional parameter with additional options\n * @returns {module:skins/Skin.Skin}\n */\n static getSkin(skinName = 'default', ps, options = {}) {\n skinName = skinName || 'default';\n\n // Correct old skin names\n if (skinName.charAt(0, 1) === '@' && skinName.endsWith('.xml'))\n skinName = skinName.substring(1, skinName.length - 4);\n\n // look for the skin in the stack of realized skins\n if (skinName && ps) {\n // TODO: Check also `options`!\n const sk = Skin.skinStack.find(s => s.name === skinName && s.ps === ps);\n if (sk)\n return sk;\n }\n\n // Locates the class of the requested Skin (or [DefaultSkin](DefaultSkin.html)\n // if not specified). When not found, a new one is created and registered in `skinStack`\n let cl = Skin.CLASSES[skinName];\n if (!cl) {\n // Process custom skin XML files\n const mbe = ps.project.mediaBag.getElement(skinName, false);\n if (mbe && mbe.data) {\n options = Object.assign({}, options, mbe.data);\n options.skinId = `JClic-${skinName.replace('.xml', '')}`;\n }\n\n if (!ps.zip\n && options.class === 'edu.xtec.jclic.skins.BasicSkin'\n && options.image\n && ps.project.mediaBag.getElement(options.image, false)\n && ps.project.mediaBag.getElement(options.image, false).data)\n cl = Skin.CLASSES.custom;\n else {\n log('warn', `Unknown skin class: ${skinName}`);\n cl = Skin.CLASSES.default;\n }\n }\n\n // Build and return the requested skin\n return new cl(ps, skinName, options);\n }\n\n /**\n * Returns the CSS styles used by this skin. This method should be called only from\n * the `Skin` constructor, and overridded by subclasses if needed.\n * @param {string} media - A specific media size. Possible values are: 'default', 'half' and 'twoThirds'\n * @returns {string}\n */\n _getStyleSheets(media = 'default') {\n return media === 'default' ? (this.basicCSS + this.waitAnimCSS + this.reportsCSS) : '';\n }\n\n /**\n * Attaches a {@link module:JClicPlayer.JClicPlayer JClicPlayer} object to this Skin\n * @param {module:JClicPlayer.JClicPlayer} player\n */\n attach(player) {\n this.detach();\n if (player !== null && player.skin !== null)\n player.skin.detach();\n this.player = player;\n this.$playerCnt.prepend(player.$div);\n this.setSkinSizes();\n player.$mainContainer.append(this.$div);\n }\n\n /**\n * Sets the 'size' CSS values (max, min and compulsory) to the main `div` of this skin\n * @param {boolean} full - `true` when the skin is in full screen mode\n */\n setSkinSizes(full) {\n const\n css = {},\n topHeight = this.player?.$topDiv.height() || 0,\n nilValue = this.player.fullScreenChecked ? 'inherit' : null;\n\n // When `full` no set, detect the current status\n if (typeof full === 'undefined')\n full = document && document.fullscreenElement ? true : false;\n\n toCssSize(full ? '100vw' : this.ps.options.minWidth, css, 'min-width', nilValue);\n toCssSize(full ? '100vh' : this.ps.options.minHeight, css, 'min-height', nilValue);\n toCssSize(full ? '100vw' : this.ps.options.maxWidth, css, 'max-width', nilValue);\n toCssSize(full ? '100vh' : this.ps.options.maxHeight, css, 'max-height', nilValue);\n toCssSize(full ? '100vw' : this.ps.options.width, css, 'width', '100%');\n toCssSize(full ? '100vh' : this.ps.options.height, css, 'height', topHeight > 0 ? '100%' : '100vh');\n this.$div.css(css);\n }\n\n /**\n * Detaches the `player` element from this Skin\n */\n detach() {\n if (this.player !== null) {\n this.player.$div.remove();\n this.$div.detach();\n this.player = null;\n }\n }\n\n /**\n * Updates the graphic contents of this skin.\n * This method should be called from {@link module:skins/Skin.Skin#update}\n * @override\n * @param {module:AWT.Rectangle} dirtyRegion - Specifies the area to be updated. When `null`, it's the\n * whole panel.\n */\n updateContent(dirtyRegion) {\n if (this.$msgBoxDivCanvas) {\n const ctx = this.$msgBoxDivCanvas.get(-1).getContext('2d');\n ctx.clearRect(0, 0, ctx.canvas.clientWidth, ctx.canvas.clientHeight);\n this.msgBox.update(ctx, dirtyRegion);\n }\n return super.updateContent();\n }\n\n /**\n * Resets all counters\n * @param {boolean} bEnabled - Leave it enabled/disabled\n */\n resetAllCounters(bEnabled) {\n $.each(this.counters, (_name, counter) => {\n if (counter !== null) {\n counter.value = 0;\n counter.countDown = 0;\n counter.enabled = bEnabled;\n counter.refreshDisplay();\n }\n });\n }\n\n /**\n * Sets/unsets the 'wait' state\n * @param {boolean} status - Whether to set or unset the wait status. When `undefined`, the\n * `waitCursorCount` member is evaluated to decide if the wait state should be activated or deactivated.\n */\n setWaitCursor(status) {\n if (typeof status === 'undefined') {\n if (this.$waitPanel)\n this.$waitPanel.css({\n display: this.waitCursorCount > 0 ? 'initial' : 'none'\n });\n } else {\n switch (status) {\n case true:\n this.waitCursorCount++;\n break;\n case false:\n if (--this.waitCursorCount < 0)\n this.waitCursorCount = 0;\n break;\n case 'reset':\n this.waitCursorCount = 0;\n break;\n }\n this.setWaitCursor();\n }\n }\n\n /**\n * Sets the current value of the progress bar\n * @param {number} val - The current value. Should be less or equal than `max`. When -1, the progress bar will be hidden.\n * @param {number} [max] - Optional parameter representing the maximum value. When passed, the progress bar will be displayed.\n */\n setProgress(val, max) {\n if (this.$progress) {\n this.currentProgress = val;\n if (val < 0)\n this.$progress.css({ display: 'none' });\n else {\n if (max) {\n this.maxProgress = max;\n this.$progress.attr('max', max).css({ display: 'initial' });\n }\n this.$progress.attr('value', val);\n }\n log('trace', `Progress: ${this.currentProgress}/${this.maxProgress}`);\n }\n }\n\n /**\n * Increments the progress bar value by the specified amount, only when the progress bar is running.\n * @param {number} [val] - The amount to increment. When not defined, it's 1.\n */\n incProgress(val) {\n if (this.currentProgress >= 0)\n this.setProgress(this.currentProgress + (val || 1));\n }\n\n /**\n * Shows a window with clues or help for the current activity\n * @param {external:jQuery} _$hlpComponent - A JQuery DOM element with the information to be shown.\n * It can be a string or number. When `null`, the help window (if any) must be closed.\n */\n showHelp(_$hlpComponent) {\n // TODO: Implement HelpWindow\n }\n\n /**\n * Shows a \"dialog\" panel, useful for displaying information or prompt something to users\n * @param {boolean} modal - When `true`, the dialog should be closed by any click outside the main panel\n * @param {object} options - This object should have two components: `main` and `bottom`, both\n * containing a jQuery HTML element (or array of elements) to be placed on the main and bottom panels\n * of the dialog.\n * @returns {external:Promise} - A Promise that will be fulfilled when the dialog is closed.\n */\n showDlg(modal, options) {\n return new Promise((resolve, reject) => {\n this._dlgOkValue = 'ok';\n this._dlgCancelValue = 'cancelled';\n this._isModalDlg = modal;\n\n this.$dlgMainPanel.children().detach();\n this.$dlgBottomPanel.children().detach();\n if (options.main)\n this.$dlgMainPanel.append(options.main);\n if (options.bottom)\n this.$dlgBottomPanel.append(options.bottom);\n\n this._closeDlg = resolved => {\n if (resolved && resolve)\n resolve(this._dlgOkValue);\n else if (!resolved && reject)\n reject(this._dlgCancelValue);\n this.$dlgOverlay.css({ display: 'none' });\n this.enableMainButtons(true);\n this._closeDlg = Skin.prototype._closeDlg;\n };\n this.enableMainButtons(false);\n this.$dlgOverlay.css({ display: 'initial' });\n });\n }\n\n /**\n * Enables or disables the `tabindex` attribute of the main buttons. Useful when a modal dialog\n * overlay is active, to avoid direct access to controls not related with the dialog.\n * @param {boolean} status - `true` to make main controls navigable, `false` otherwise\n */\n enableMainButtons(status) {\n this.$playerCnt.find('button').attr('tabindex', status ? '0' : '-1');\n }\n\n /**\n * Called when the dialog must be closed, usually only by Skin members.\n * This method is re-defined on each call to `showDlg`, so the `resolve` and `reject`\n * functions can be safely called.\n */\n _closeDlg() {\n // Do nothing\n }\n\n /**\n * Displays a dialog with a report of the current results achieved by the user.\n * @param {module:report/Reporter.Reporter} reporter - The reporter system currently in use\n * @returns {external:Promise} - The Promise returned by {@link module:skins/Skin.Skin.showDlg}.\n */\n showReports(reporter) {\n this.$reportsPanel.html(this.$printReport(reporter));\n return this.showDlg(false, {\n main: [this.$infoHead, this.$reportsPanel],\n bottom: [this.$copyBtn, this.$closeDlgBtn]\n });\n }\n\n /**\n * Formats the current report in a DOM tree, ready to be placed in `$reportsPanel`\n * @param {module:report/Reporter.Reporter} reporter - The reporter system currently in use\n * @returns {external:jQuery[]} - An array of jQuery objects containing the full report\n */\n $printReport(reporter) {\n let result = [];\n if (reporter) {\n const\n report = reporter.getData(),\n started = new Date(report.started);\n\n result.push($('<div/>', { class: 'subTitle', id: this.ps.getUniqueId('ReportsLb') }).html(getMsg('Current results')));\n\n const $t = $('<table/>', { class: 'JCGlobalResults' });\n $t.append(\n $HTML.doubleCell(\n getMsg('Session started:'),\n `${started.toLocaleDateString()} ${started.toLocaleTimeString()}`),\n $HTML.doubleCell(\n getMsg('Reports system:'),\n `${getMsg(report.descriptionKey)} ${report.descriptionDetail}`));\n if (report.userId)\n $t.append($HTML.doubleCell(\n getMsg('User:'),\n report.userId));\n else if (report.user) // SCORM user\n $t.append($HTML.doubleCell(\n getMsg('User:'),\n report.user));\n\n if (report.sequences > 0) {\n if (report.sessions.length > 1)\n $t.append($HTML.doubleCell(\n getMsg('Projects:'),\n report.sessions.length));\n $t.append(\n $HTML.doubleCell(\n getMsg('Sequences:'),\n report.sequences),\n $HTML.doubleCell(\n getMsg('Activities done:'),\n report.activitiesDone),\n $HTML.doubleCell(\n getMsg('Activities played at least once:'),\n `${report.playedOnce}/${report.reportable} (${getPercent(report.ratioPlayed / 100)})`));\n if (report.activitiesDone > 0) {\n $t.append($HTML.doubleCell(\n getMsg('Activities solved:'),\n `${report.activitiesSolved} (${getPercent(report.ratioSolved / 100)})`));\n if (report.actScore > 0)\n $t.append(\n $HTML.doubleCell(\n getMsg('Partial score:'),\n `${getPercent(report.partialScore / 100)} ${getMsg('(out of played activities)')}`),\n $HTML.doubleCell(\n getMsg('Global score:'),\n `${getPercent(report.globalScore / 100)} ${getMsg('(out of all project activities)')}`));\n $t.append(\n $HTML.doubleCell(\n getMsg('Total time in activities:'),\n getHMStime(report.time * 1000)),\n $HTML.doubleCell(\n getMsg('Actions done:'),\n report.actions));\n }\n result.push($t);\n\n report.sessions.forEach(sr => {\n if (sr.sequences.length > 0) {\n const $t = $('<table/>', { class: 'JCDetailed' });\n result.push($('<p/>').html(report.sessions.length > 1 ? `${getMsg('Project')} ${sr.projectName}` : ''));\n $t.append($('<thead/>').append($('<tr/>').append(\n $HTML.th(getMsg('sequence')),\n $HTML.th(getMsg('activity')),\n $HTML.th(getMsg('OK')),\n $HTML.th(getMsg('actions')),\n $HTML.th(getMsg('score')),\n $HTML.th(getMsg('time')))));\n\n sr.sequences.forEach(seq => {\n let $tr = $('<tr/>').append($('<td/>', { rowspan: seq.activities.length }).html(seq.sequence));\n seq.activities.forEach(act => {\n if (act.closed) {\n $tr.append($HTML.td(act.name));\n $tr.append(act.solved ? $HTML.td(getMsg('YES'), 'ok') : $HTML.td(getMsg('NO'), 'no'));\n $tr.append($HTML.td(act.actions));\n $tr.append($HTML.td(getPercent(act.precision / 100)));\n $tr.append($HTML.td(getHMStime(act.time * 1000)));\n } else {\n $tr.append($HTML.td(act.name, 'incomplete'));\n for (let r = 0; r < 4; r++)\n $tr.append($HTML.td('-', 'incomplete'));\n }\n $t.append($tr);\n $tr = $('<tr/>');\n });\n });\n\n $t.append($('<tr/>').append(\n $HTML.td(getMsg('Total:')),\n $HTML.td(`${sr.played} (${getPercent(sr.ratioPlayed / 100)})`),\n $HTML.td(`${sr.solved} (${getPercent(sr.ratioSolved / 100)})`),\n $HTML.td(sr.actions),\n $HTML.td(getPercent(sr.score / 100)),\n $HTML.td(getHMStime(sr.time * 1000))));\n\n result.push($t);\n }\n }, this);\n } else\n result.push($('<p/>').html(getMsg('No activities done!')));\n }\n return result;\n }\n\n /**\n * Enables or disables a specific counter\n * @param {string} counter - Which counter\n * @param {boolean} bEnabled - When `true`, the counter will be enabled.\n */\n enableCounter(counter, bEnabled) {\n if (this.counters[counter])\n this.counters[counter].setEnabled(bEnabled);\n }\n\n /**\n * Main method used to build the content of the skin. Resizes and places internal objects.\n */\n doLayout() {\n // Resize player\n this.player.doLayout();\n\n // Build ths canvas at the end of current thread, thus avoiding\n // invalid sizes due to incomplete layout of DOM objects\n if (this.$msgBoxDiv)\n window.setTimeout(() => {\n\n // Temporary remove canvas to let div get its natural size:\n if (this.$msgBoxDivCanvas)\n this.$msgBoxDivCanvas.remove();\n\n // Get current size of message box div without canvas\n const\n msgWidth = this.$msgBoxDiv.outerWidth(),\n msgHeight = this.$msgBoxDiv.outerHeight();\n\n // Replace existing canvas if size has changed\n if (this.$msgBoxDivCanvas === null ||\n this.msgBox.dim.widht !== msgWidth ||\n this.msgBox.dim.height !== msgHeight) {\n this.$msgBoxDivCanvas = $(`<canvas width=\"${msgWidth}\" height=\"${msgHeight}\"/>`);\n this.msgBox.setBounds(new Rectangle(0, 0, msgWidth + 1, msgHeight));\n this.msgBox.buildAccessibleElement(this.$msgBoxDivCanvas, this.$msgBoxDiv);\n }\n // restore canvas\n this.$msgBoxDiv.append(this.$msgBoxDivCanvas);\n this.updateContent();\n }, 0);\n }\n\n /**\n * adjusts the skin to the dimension of its `$div` container\n * @returns {module:AWT.Dimension} the new dimension of the skin\n */\n fit() {\n this.doLayout();\n return new Dimension(this.$div.width(), this.$div.height());\n }\n\n /**\n * Sets or unsets the player in fullscreen mode, when allowed, using the\n * {@link https://github.com/sindresorhus/screenfull.js|screenfull.js} library.\n * @param {boolean} status - Whether to set or unset the player in fullscreen mode. When `null`\n * or `undefined`, the status toggles between fullscreen and windowed modes.\n * @returns {boolean} `true` if the request was successful, `false` otherwise.\n */\n setScreenFull(status) {\n if (document && document.fullscreenEnabled && (\n status === true && !document.fullscreenElement ||\n status === false && !document.fullscreenElement ||\n status !== true && status !== false)) {\n // Save current value of fullScreen for later use\n const full = document.fullscreenElement ? true : false;\n if (!document.fullscreenElement) {\n const element = this.player.$mainContainer.get(-1);\n if (element && element.requestFullscreen)\n element.requestFullscreen();\n } else {\n if (document.exitFullscreen) {\n document.exitFullscreen();\n }\n }\n this.player.fullScreenChecked = true;\n // Firefox don't updates `document.fullscreenElement` in real time, so use the saved value instead\n this.setSkinSizes(!full);\n }\n }\n\n /**\n * Method used to notify this skin that a specific action has changed its enabled/disabled status\n * @param {module:AWT.Action} _action - The action originating the change event\n */\n actionStatusChanged(act) {\n if (act.name && this.buttons[act.name])\n this.setEnabled(this.buttons[act.name], act.enabled);\n }\n\n /**\n * Enables or disables an object\n * @param {external:jQuery} $object - A JQuery DOM element\n * @override\n * @param {boolean} enabled\n */\n setEnabled($object, enabled) {\n if ($object && enabled)\n $object.removeAttr('disabled');\n else if ($object)\n $object.attr('disabled', true);\n }\n\n /**\n * Compares two Skin objects\n * @param {module:skins/Skin.Skin} skin - The Skin to compare against this\n * @returns {boolean} - `true` if both skins are equivalent.\n */\n equals(skin) {\n return skin &&\n this.name === skin.name &&\n this.ps === skin.ps;\n }\n\n /**\n * Gets the {@link module:boxes/ActiveBox.ActiveBox ActiveBox} used to display the main messages of activities\n * @returns {module:boxes/ActiveBox.ActiveBox}\n */\n getMsgBox() {\n return this.msgBox;\n }\n}\n\n/**\n * Collection of realized __Skin__ objects.\n * @type {module:skins/Skin.Skin[]}\n */\nSkin.skinStack = [];\n\n/**\n * Collection of skin style sheets already registered on the current document\n * @type {object}\n */\nSkin.rootStyles = {};\n\n/**\n * Counter used to label root nodes with unique IDs\n * @type {number}\n */\nSkin.lastId = 1;\n\n/**\n * List of classes derived from Skin. It should be filled by real skin classes at declaration time.\n * @type {object}\n */\nSkin.CLASSES = {};\n\nObject.assign(Skin.prototype, {\n /**\n * Class name of this skin. It will be used as a base selector in the definition of all CSS styles.\n * @name module:skins/Skin.Skin#skinId\n * @type {string} */\n skinId: 'JClicBasicSkin',\n /**\n * The HTML div object used by this Skin\n * @name module:skins/Skin.Skin#$div\n * @type {external:jQuery} */\n $div: null,\n /**\n * The HTML div where JClic Player will be placed\n * @name module:skins/Skin.Skin#$playerCnt\n * @type {external:jQuery} */\n $playerCnt: null,\n /**\n * Current name of the skin.\n * @name module:skins/Skin.Skin#name\n * @type {string} */\n name: 'default',\n /**\n * Specific options of this skin\n * @name module:skins/Skin.Skin#options\n * @type {object} */\n options: {},\n /**\n * Waiting panel, displayed while loading resources.\n * @name module:skins/Skin.Skin#$waitPanel\n * @type {external:jQuery} */\n $waitPanel: null,\n /**\n * Graphic indicator of loading progress\n * @name module:skins/Skin.Skin#$progress\n * @type {external:jQuery} */\n $progress: null,\n /**\n * Current value of the progress bar\n * @name module:skins/Skin.Skin#currentProgress\n * @type {number} */\n currentProgress: -1,\n /**\n * Max value of the progress bar\n * @name module:skins/Skin.Skin#maxProgress\n * @type {number} */\n maxProgress: 0,\n /**\n * The box used to display the main messages of JClic activities\n * @name module:skins/Skin.DefaultSkin#msgBox\n * @type {module:boxes/ActiveBox.ActiveBox} */\n msgBox: null,\n /**\n * The `div` DOM object where `msgBox` is located\n * @name module:skins/Skin.DefaultSkin#$msgBoxDiv\n * @type {external:jQuery} */\n $msgBoxDiv: null,\n /*\n * An HTML `canvas` object created in `$msgBoxDiv`\n * @name module:skins/Skin.DefaultSkin#$msgBoxDivCanvas\n * @type {external:jQuery} */\n $msgBoxDivCanvas: null,\n /**\n * Main panel used to display modal and non-modal dialogs\n * @name module:skins/Skin.Skin#$dlgOverlay\n * @type {external:jQuery} */\n $dlgOverlay: null,\n /**\n * Main panel of dialogs, where relevant information must be placed\n * @name module:skins/Skin.Skin#$dlgMainPanel\n * @type {external:jQuery} */\n $dlgMainPanel: null,\n /**\n * Bottom panel of dialogs, used for action buttons\n * @name module:skins/Skin.Skin#$dlgBottomPanel\n * @type {external:jQuery} */\n $dlgBottomPanel: null,\n /**\n * Element usually used as header in dialogs, with JClic logo, name and version\n * @name module:skins/Skin.Skin#infoHead\n * @type {external:jQuery} */\n $infoHead: null,\n /**\n * Iconic button used to copy content to clipboard\n * @name module:skins/Skin.Skin#$copyBtn\n * @type {external:jQuery} */\n $copyBtn: null,\n /**\n * Iconic button used to close the dialog\n * @name module:skins/Skin.Skin#$closeDlgBtn\n * @type {external:jQuery} */\n $closeDlgBtn: null,\n /**\n * OK dialog button\n * @name module:skins/Skin.Skin#$okDlgBtn\n * @type {external:jQuery} */\n $okDlgBtn: null,\n /**\n * Cancel dialog button\n * @name module:skins/Skin.Skin#$cancelDlgBtn\n * @type {external:jQuery} */\n $cancelDlgBtn: null,\n /**\n * Value to be returned by the dialog promise when the presented task is fulfilled\n * @name module:skins/Skin.Skin#_dlgOkValue\n * @type {object} */\n _dlgOkValue: null,\n /**\n * Value to be returned in user-canceled dialogs\n * @name module:skins/Skin.Skin#_dlgCancelValue\n * @type {object} */\n _dlgCancelValue: null,\n /**\n * Flag indicating if the current dialog is modal or not\n * @name module:skins/Skin.Skin#_isModalDlg\n * @type {boolean} */\n _isModalDlg: false,\n /**\n * Div inside {@link module:skins/Skin.Skin#$dlgOverlay $dlgOverlay} where JClicPlayer will place the information to be shown\n * @name module:skins/Skin.Skin#$reportsPanel\n * @type {external:jQuery} */\n $reportsPanel: null,\n /**\n * The basic collection of buttons that most skins implement\n * @name module:skins/Skin.Skin#buttons\n * @type {object} */\n buttons: {\n 'prev': null,\n 'next': null,\n 'return': null,\n 'reset': null,\n 'info': null,\n 'help': null,\n 'audio': null,\n 'about': null,\n 'fullscreen': null,\n 'close': null\n },\n /**\n * The collection of counters\n * @name module:skins/Skin.Skin#counters\n * @type {object} */\n counters: {\n 'actions': null,\n 'score': null,\n 'time': null\n },\n /**\n * The collection of message areas\n * @name module:skins/Skin.Skin#msgArea\n * @type {object} */\n msgArea: {\n 'main': null,\n 'aux': null,\n 'mem': null\n },\n /**\n * The {@link module:JClicPlayer.JClicPlayer JClicPlayer} object associated to this skin\n * @name module:skins/Skin.Skin#player\n * @type {module:JClicPlayer.JClicPlayer} */\n player: null,\n /**\n * The {@link http://projectestac.github.io/jclic/apidoc/edu/xtec/jclic/PlayStation.html|PlayStation}\n * used by this Skin. Usually, the same as `player`\n * @name module:skins/Skin.Skin#ps\n * @type {module:JClicPlayer.JClicPlayer} */\n ps: null,\n /**\n * Counter to be incremented or decremented as `waitCursor` is requested or released.\n * @name module:skins/Skin.Skin#waitCursorCount\n * @type {number} */\n waitCursorCount: 0,\n //\n // Buttons and other graphical resources used by this skin.\n //\n /**\n * Main styles\n * @name module:skins/Skin.Skin#basicCSS\n * @type {string} */\n basicCSS,\n /**\n * Waiting screen styles\n * @name module:skins/Skin.Skin#waitAnimCSS\n * @type {string} */\n waitAnimCSS,\n /**\n * Animated image displayed while loading resources\n * Based on Ryan Allen's [svg-spinner](http://articles.dappergentlemen.com/2015/01/13/svg-spinner/)\n * @name module:skins/Skin.Skin#waitImgBig\n * @type {string} */\n waitImgBig,\n /**\n * Animated image displayed while loading resources (small)\n * @name module:skins/Skin.Skin#waitImgSmall\n * @type {string} */\n waitImgSmall,\n /**\n * Reports screen styles\n * @name module:skins/Skin.Skin#reportsCSS\n * @type {string} */\n reportsCSS,\n //\n // Icons used in buttons:\n //\n /**\n * Icon for 'close dialog' button\n * @name module:skins/Skin.Skin#closeDialogIcon\n * @type {string} */\n closeDialogIcon,\n /**\n * Icon for 'ok' button\n * @name module:skins/Skin.Skin#okDialogIcon\n * @type {string} */\n okDialogIcon,\n /**\n * Icon for 'copy' button\n * @name module:skins/Skin.Skin#copyIcon\n * @type {string} */\n copyIcon,\n /**\n * JClic logo\n * @name module:skins/Skin.Skin#appLogo\n * @type {string} */\n appLogo,\n /**\n * Screen sizes (width and height) below which will half sized elements will be used\n * @name module:skins/Skin.DefaultSkin#halfMedia\n * @type {object} */\n halfMedia: { width: 376, height: 282 },\n /**\n * Screen sizes (width and height) below which will two-thirds sized elements will be used\n * @name module:skins/Skin.DefaultSkin#twoThirdsMedia\n * @type {object} */\n twoThirdsMedia: { width: 420, height: 315 },\n});\n\nexport default Skin;\n"],"names":[],"sourceRoot":""}
|
package/dist/7781.jclic-node.js
DELETED
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
exports.id = 7781;
|
|
3
|
-
exports.ids = [7781];
|
|
4
|
-
exports.modules = {
|
|
5
|
-
|
|
6
|
-
/***/ 7781:
|
|
7
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8
|
-
|
|
9
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10
|
-
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
11
|
-
/* harmony export */ });
|
|
12
|
-
/* unused harmony export ActiveBoxGrid */
|
|
13
|
-
/* harmony import */ var _ActiveBoxBag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(427);
|
|
14
|
-
/* harmony import */ var _ActiveBox_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1725);
|
|
15
|
-
/* harmony import */ var _AWT_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7912);
|
|
16
|
-
/* harmony import */ var _Utils_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1253);
|
|
17
|
-
/**
|
|
18
|
-
* File : boxes/ActiveBoxGrid.js
|
|
19
|
-
* Created : 19/05/2015
|
|
20
|
-
* By : Francesc Busquets <francesc@gmail.com>
|
|
21
|
-
*
|
|
22
|
-
* JClic.js
|
|
23
|
-
* An HTML5 player of JClic activities
|
|
24
|
-
* https://projectestac.github.io/jclic.js
|
|
25
|
-
*
|
|
26
|
-
* @source https://github.com/projectestac/jclic.js
|
|
27
|
-
*
|
|
28
|
-
* @license EUPL-1.2
|
|
29
|
-
* @licstart
|
|
30
|
-
* (c) 2000-2020 Catalan Educational Telematic Network (XTEC)
|
|
31
|
-
*
|
|
32
|
-
* Licensed under the EUPL, Version 1.1 or -as soon they will be approved by
|
|
33
|
-
* the European Commission- subsequent versions of the EUPL (the "Licence");
|
|
34
|
-
* You may not use this work except in compliance with the Licence.
|
|
35
|
-
*
|
|
36
|
-
* You may obtain a copy of the Licence at:
|
|
37
|
-
* https://joinup.ec.europa.eu/software/page/eupl
|
|
38
|
-
*
|
|
39
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
40
|
-
* distributed under the Licence is distributed on an "AS IS" basis, WITHOUT
|
|
41
|
-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
42
|
-
* Licence for the specific language governing permissions and limitations
|
|
43
|
-
* under the Licence.
|
|
44
|
-
* @licend
|
|
45
|
-
* @module
|
|
46
|
-
*/
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* This class extends {@link module:boxes/ActiveBoxbag.ActiveBoxBag ActiveBoxBag} with constructors that take an argument of type
|
|
55
|
-
* {@link module:shapers/Shaper.Shaper Shaper} used to build all its {@link module:boxes/ActiveBox.ActiveBox ActiveBox}components. It also maintains information
|
|
56
|
-
* about the number of "rows" and "columns", useful to compute valid (integer) values when
|
|
57
|
-
* resizing or moving its components.
|
|
58
|
-
* @extends module:boxes/ActiveBoxBag.ActiveBoxBag
|
|
59
|
-
*/
|
|
60
|
-
class ActiveBoxGrid extends _ActiveBoxBag_js__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
61
|
-
/**
|
|
62
|
-
* ActiveBxGrid constructor
|
|
63
|
-
* @param {module:boxes/AbstractBox.AbstractBox} parent - The AbstractBox to which this box grid belongs
|
|
64
|
-
* @param {module:AWT.Container} container - The container where this box grid is placed.
|
|
65
|
-
* @param {module:boxes/BoxBase} boxBase - The object where colors, fonts, border and other graphic properties
|
|
66
|
-
* @param {number} px - `X` coordinate of the upper left corner of this box grid
|
|
67
|
-
* @param {number} py - `Y` coordinate of the upper left corner of this box grid
|
|
68
|
-
* @param {number} setWidth - Total width of the box grid
|
|
69
|
-
* @param {number} setHeight - Total height of the box grid
|
|
70
|
-
* @param {module:shapers/Shaper.Shaper} sh - Shaper used to build the ActiveBox objects
|
|
71
|
-
*/
|
|
72
|
-
constructor(parent, container, boxBase, px, py, setWidth, setHeight, sh) {
|
|
73
|
-
// ActiveBoxGrid derives from ActiveBoxBag
|
|
74
|
-
super(parent, container, boxBase);
|
|
75
|
-
|
|
76
|
-
this.nCols = sh.nCols;
|
|
77
|
-
this.nRows = sh.nRows;
|
|
78
|
-
|
|
79
|
-
// This will be the enclosing rectangle of this ActiveBox bag
|
|
80
|
-
const r = new _AWT_js__WEBPACK_IMPORTED_MODULE_2__/* .Rectangle */ .M_(
|
|
81
|
-
new _AWT_js__WEBPACK_IMPORTED_MODULE_2__/* .Point */ .bR(px, py),
|
|
82
|
-
new _AWT_js__WEBPACK_IMPORTED_MODULE_2__/* .Dimension */ .fg(
|
|
83
|
-
Math.round(setWidth / this.nCols) * this.nCols,
|
|
84
|
-
Math.round(setHeight / this.nRows) * this.nRows));
|
|
85
|
-
|
|
86
|
-
// Create all the [ActiveBox](ActiveBox.html) objects based on the
|
|
87
|
-
// shapes provided by the [Shaper](Shaper.html)
|
|
88
|
-
for (let i = 0; i < sh.nCells; i++) {
|
|
89
|
-
const
|
|
90
|
-
tmpSh = sh.getShape(i, r),
|
|
91
|
-
bx = new _ActiveBox_js__WEBPACK_IMPORTED_MODULE_1__["default"](this, container, boxBase, i, tmpSh.getBounds());
|
|
92
|
-
if (!sh.rectangularShapes)
|
|
93
|
-
bx.setShape(tmpSh);
|
|
94
|
-
this.addActiveBox(bx);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
// If the Shaper has `remainder` (extra space), set the background box of this
|
|
98
|
-
// [BoxBag](BoxBag.html)
|
|
99
|
-
if (sh.hasRemainder) {
|
|
100
|
-
const
|
|
101
|
-
tmpSh = sh.getRemainderShape(r),
|
|
102
|
-
bx = new _ActiveBox_js__WEBPACK_IMPORTED_MODULE_1__["default"](this, container, boxBase, 0, tmpSh.getBounds());
|
|
103
|
-
bx.setShape(tmpSh);
|
|
104
|
-
this.setBackgroundBox(bx);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* This factory constructor creates a new empty grid with the number of cells indicated by the
|
|
110
|
-
* {@link module:boxes/ActiveBagContent.ActiveBagContent ActiveBagContent} `abc`, not filling the cells with any content.
|
|
111
|
-
* @param {module:boxes/AbstractBox.AbstractBox} parent - The AbstractBox to which this box grid belongs
|
|
112
|
-
* @param {module:AWT.Container} container - The container where this box grid is placed.
|
|
113
|
-
* @param {number} px - `X` coordinate of the upper left corner of this box grid
|
|
114
|
-
* @param {number} py - `Y` coordinate of the upper left corner of this box grid
|
|
115
|
-
* @param {module:boxes/ActiveBagContent.ActiveBagContent} abc - Used only to get the number of cells and the shaper (when `sh` is `null`)
|
|
116
|
-
* @param {module:shapers/Shaper.Shaper} sh - Shaper used to build the ActiveBox objects
|
|
117
|
-
* @param {module:boxes/BoxBase.BoxBase} boxBase - The object where colors, fonts, border and other graphic properties
|
|
118
|
-
* of this box grid are defined.
|
|
119
|
-
* @returns {module:boxes/ActiveBoxGrid.ActiveBoxGrid}
|
|
120
|
-
*/
|
|
121
|
-
static createEmptyGrid(parent, container, px, py, abc, sh, boxBase) {
|
|
122
|
-
const result = abc ? new ActiveBoxGrid(parent, container,
|
|
123
|
-
boxBase || abc.style,
|
|
124
|
-
px, py,
|
|
125
|
-
abc.getTotalWidth(), abc.getTotalHeight(),
|
|
126
|
-
sh || abc.getShaper()) : null;
|
|
127
|
-
|
|
128
|
-
if (result)
|
|
129
|
-
result.setBorder(abc.border);
|
|
130
|
-
|
|
131
|
-
return result;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* Gets the minimum size of this grid
|
|
136
|
-
* @returns {module:AWT.Dimension}
|
|
137
|
-
*/
|
|
138
|
-
getMinimumSize() {
|
|
139
|
-
return new _AWT_js__WEBPACK_IMPORTED_MODULE_2__/* .Dimension */ .fg(
|
|
140
|
-
_Utils_js__WEBPACK_IMPORTED_MODULE_3__/* .settings */ .W0.MIN_CELL_SIZE * this.nCols,
|
|
141
|
-
_Utils_js__WEBPACK_IMPORTED_MODULE_3__/* .settings */ .W0.MIN_CELL_SIZE * this.nRows);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* Gets a scaled size of this grid, rounded to the nearest integer values
|
|
146
|
-
* @param {number} scale - The scale factor
|
|
147
|
-
* @returns {module:AWT.Dimension}
|
|
148
|
-
*/
|
|
149
|
-
getScaledSize(scale) {
|
|
150
|
-
return new _AWT_js__WEBPACK_IMPORTED_MODULE_2__/* .Dimension */ .fg(
|
|
151
|
-
(0,_Utils_js__WEBPACK_IMPORTED_MODULE_3__/* .roundTo */ .GB)(scale * this.preferredBounds.dim.width, this.nCols),
|
|
152
|
-
(0,_Utils_js__WEBPACK_IMPORTED_MODULE_3__/* .roundTo */ .GB)(scale * this.preferredBounds.dim.height, this.nRows));
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* Returns the logical coordinates of the provided {@link module:boxes/ActiveBox.ActiveBox ActiveBox}.
|
|
157
|
-
* The units of the result are not pixels, but ordinal numbers (relative positions) of columns
|
|
158
|
-
* and rows in the grid.
|
|
159
|
-
* @param {module:boxes/ActiveBox.ActiveBox} bx - The box to process
|
|
160
|
-
* @returns {module:AWT.Point}
|
|
161
|
-
*/
|
|
162
|
-
getCoord(bx) {
|
|
163
|
-
return new _AWT_js__WEBPACK_IMPORTED_MODULE_2__/* .Point */ .bR(bx.idLoc % this.nCols, Math.floor(bx.idLoc / this.nCols));
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* Calculates the logical distance between two {@link module:boxes/ActiveBox.ActiveBox ActiveBox} objects.
|
|
168
|
-
* Resulting units are not pixels, but ordinal numbers (relative positions) of columns and rows
|
|
169
|
-
* in the grid.
|
|
170
|
-
* @param {module:boxes/ActiveBox.ActiveBox} src - First box
|
|
171
|
-
* @param {module:boxes/ActiveBox.ActiveBox} dest - Second box
|
|
172
|
-
* @returns {module:AWT.Point}
|
|
173
|
-
*/
|
|
174
|
-
getCoordDist(src, dest) {
|
|
175
|
-
const
|
|
176
|
-
ptSrc = this.getCoord(src),
|
|
177
|
-
ptDest = this.getCoord(dest);
|
|
178
|
-
return new _AWT_js__WEBPACK_IMPORTED_MODULE_2__/* .Point */ .bR(ptDest.x - ptSrc.x, ptDest.y - ptSrc.y);
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
Object.assign(ActiveBoxGrid.prototype, {
|
|
183
|
-
/**
|
|
184
|
-
* Number of columns of this box grid
|
|
185
|
-
* @name module:boxes/ActiveBoxGrid.ActiveBoxGrid#nCols
|
|
186
|
-
* @type {number} */
|
|
187
|
-
nCols: 1,
|
|
188
|
-
/**
|
|
189
|
-
* Number of rows of this box grid
|
|
190
|
-
* @name module:boxes/ActiveBoxGrid.ActiveBoxGrid#nRows
|
|
191
|
-
* @type {number} */
|
|
192
|
-
nRows: 1,
|
|
193
|
-
});
|
|
194
|
-
|
|
195
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ActiveBoxGrid);
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
/***/ })
|
|
199
|
-
|
|
200
|
-
};
|
|
201
|
-
;
|
|
202
|
-
//# sourceMappingURL=7781.jclic-node.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"7781.jclic-node.js","mappings":";;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAE6C;AACN;AACiB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A,eAAe,oDAAK;AACpB;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA,CAAC;;AAED,iEAAe,aAAa,EAAC","sources":["webpack://jclic/./src/boxes/ActiveBoxGrid.js"],"sourcesContent":["/**\n * File : boxes/ActiveBoxGrid.js\n * Created : 19/05/2015\n * By : Francesc Busquets <francesc@gmail.com>\n *\n * JClic.js\n * An HTML5 player of JClic activities\n * https://projectestac.github.io/jclic.js\n *\n * @source https://github.com/projectestac/jclic.js\n *\n * @license EUPL-1.2\n * @licstart\n * (c) 2000-2020 Catalan Educational Telematic Network (XTEC)\n *\n * Licensed under the EUPL, Version 1.1 or -as soon they will be approved by\n * the European Commission- subsequent versions of the EUPL (the \"Licence\");\n * You may not use this work except in compliance with the Licence.\n *\n * You may obtain a copy of the Licence at:\n * https://joinup.ec.europa.eu/software/page/eupl\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the Licence is distributed on an \"AS IS\" basis, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n * Licence for the specific language governing permissions and limitations\n * under the Licence.\n * @licend\n * @module\n */\n\nimport ActiveBoxBag from './ActiveBoxBag.js';\nimport ActiveBox from './ActiveBox.js';\nimport { Rectangle, Dimension, Point } from '../AWT.js';\nimport { settings, roundTo } from '../Utils.js';\n\n/**\n * This class extends {@link module:boxes/ActiveBoxbag.ActiveBoxBag ActiveBoxBag} with constructors that take an argument of type\n * {@link module:shapers/Shaper.Shaper Shaper} used to build all its {@link module:boxes/ActiveBox.ActiveBox ActiveBox}components. It also maintains information\n * about the number of \"rows\" and \"columns\", useful to compute valid (integer) values when\n * resizing or moving its components.\n * @extends module:boxes/ActiveBoxBag.ActiveBoxBag\n */\nexport class ActiveBoxGrid extends ActiveBoxBag {\n /**\n * ActiveBxGrid constructor\n * @param {module:boxes/AbstractBox.AbstractBox} parent - The AbstractBox to which this box grid belongs\n * @param {module:AWT.Container} container - The container where this box grid is placed.\n * @param {module:boxes/BoxBase} boxBase - The object where colors, fonts, border and other graphic properties\n * @param {number} px - `X` coordinate of the upper left corner of this box grid\n * @param {number} py - `Y` coordinate of the upper left corner of this box grid\n * @param {number} setWidth - Total width of the box grid\n * @param {number} setHeight - Total height of the box grid\n * @param {module:shapers/Shaper.Shaper} sh - Shaper used to build the ActiveBox objects\n */\n constructor(parent, container, boxBase, px, py, setWidth, setHeight, sh) {\n // ActiveBoxGrid derives from ActiveBoxBag\n super(parent, container, boxBase);\n\n this.nCols = sh.nCols;\n this.nRows = sh.nRows;\n\n // This will be the enclosing rectangle of this ActiveBox bag\n const r = new Rectangle(\n new Point(px, py),\n new Dimension(\n Math.round(setWidth / this.nCols) * this.nCols,\n Math.round(setHeight / this.nRows) * this.nRows));\n\n // Create all the [ActiveBox](ActiveBox.html) objects based on the\n // shapes provided by the [Shaper](Shaper.html)\n for (let i = 0; i < sh.nCells; i++) {\n const\n tmpSh = sh.getShape(i, r),\n bx = new ActiveBox(this, container, boxBase, i, tmpSh.getBounds());\n if (!sh.rectangularShapes)\n bx.setShape(tmpSh);\n this.addActiveBox(bx);\n }\n\n // If the Shaper has `remainder` (extra space), set the background box of this\n // [BoxBag](BoxBag.html)\n if (sh.hasRemainder) {\n const\n tmpSh = sh.getRemainderShape(r),\n bx = new ActiveBox(this, container, boxBase, 0, tmpSh.getBounds());\n bx.setShape(tmpSh);\n this.setBackgroundBox(bx);\n }\n }\n\n /**\n * This factory constructor creates a new empty grid with the number of cells indicated by the\n * {@link module:boxes/ActiveBagContent.ActiveBagContent ActiveBagContent} `abc`, not filling the cells with any content.\n * @param {module:boxes/AbstractBox.AbstractBox} parent - The AbstractBox to which this box grid belongs\n * @param {module:AWT.Container} container - The container where this box grid is placed.\n * @param {number} px - `X` coordinate of the upper left corner of this box grid\n * @param {number} py - `Y` coordinate of the upper left corner of this box grid\n * @param {module:boxes/ActiveBagContent.ActiveBagContent} abc - Used only to get the number of cells and the shaper (when `sh` is `null`)\n * @param {module:shapers/Shaper.Shaper} sh - Shaper used to build the ActiveBox objects\n * @param {module:boxes/BoxBase.BoxBase} boxBase - The object where colors, fonts, border and other graphic properties\n * of this box grid are defined.\n * @returns {module:boxes/ActiveBoxGrid.ActiveBoxGrid}\n */\n static createEmptyGrid(parent, container, px, py, abc, sh, boxBase) {\n const result = abc ? new ActiveBoxGrid(parent, container,\n boxBase || abc.style,\n px, py,\n abc.getTotalWidth(), abc.getTotalHeight(),\n sh || abc.getShaper()) : null;\n\n if (result)\n result.setBorder(abc.border);\n\n return result;\n }\n\n /**\n * Gets the minimum size of this grid\n * @returns {module:AWT.Dimension}\n */\n getMinimumSize() {\n return new Dimension(\n settings.MIN_CELL_SIZE * this.nCols,\n settings.MIN_CELL_SIZE * this.nRows);\n }\n\n /**\n * Gets a scaled size of this grid, rounded to the nearest integer values\n * @param {number} scale - The scale factor\n * @returns {module:AWT.Dimension}\n */\n getScaledSize(scale) {\n return new Dimension(\n roundTo(scale * this.preferredBounds.dim.width, this.nCols),\n roundTo(scale * this.preferredBounds.dim.height, this.nRows));\n }\n\n /**\n * Returns the logical coordinates of the provided {@link module:boxes/ActiveBox.ActiveBox ActiveBox}.\n * The units of the result are not pixels, but ordinal numbers (relative positions) of columns\n * and rows in the grid.\n * @param {module:boxes/ActiveBox.ActiveBox} bx - The box to process\n * @returns {module:AWT.Point}\n */\n getCoord(bx) {\n return new Point(bx.idLoc % this.nCols, Math.floor(bx.idLoc / this.nCols));\n }\n\n /**\n * Calculates the logical distance between two {@link module:boxes/ActiveBox.ActiveBox ActiveBox} objects.\n * Resulting units are not pixels, but ordinal numbers (relative positions) of columns and rows\n * in the grid.\n * @param {module:boxes/ActiveBox.ActiveBox} src - First box\n * @param {module:boxes/ActiveBox.ActiveBox} dest - Second box\n * @returns {module:AWT.Point}\n */\n getCoordDist(src, dest) {\n const\n ptSrc = this.getCoord(src),\n ptDest = this.getCoord(dest);\n return new Point(ptDest.x - ptSrc.x, ptDest.y - ptSrc.y);\n }\n}\n\nObject.assign(ActiveBoxGrid.prototype, {\n /**\n * Number of columns of this box grid\n * @name module:boxes/ActiveBoxGrid.ActiveBoxGrid#nCols\n * @type {number} */\n nCols: 1,\n /**\n * Number of rows of this box grid\n * @name module:boxes/ActiveBoxGrid.ActiveBoxGrid#nRows\n * @type {number} */\n nRows: 1,\n});\n\nexport default ActiveBoxGrid;\n"],"names":[],"sourceRoot":""}
|