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.
Files changed (175) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/jclic-node.js +9 -8
  3. package/dist/jclic-node.js.map +1 -1
  4. package/dist/jclic.min.js +2 -2
  5. package/dist/jclic.min.js.map +1 -1
  6. package/package.json +4 -4
  7. package/src/GlobalData.js +1 -1
  8. package/src/JClicPlayer.js +2 -2
  9. package/src/bags/MediaBag.js +6 -5
  10. package/dist/1078.jclic-node.js +0 -282
  11. package/dist/1078.jclic-node.js.map +0 -1
  12. package/dist/1196.jclic-node.js +0 -808
  13. package/dist/1196.jclic-node.js.map +0 -1
  14. package/dist/1253.jclic-node.js +0 -1432
  15. package/dist/1253.jclic-node.js.map +0 -1
  16. package/dist/13.jclic-node.js +0 -103
  17. package/dist/13.jclic-node.js.map +0 -1
  18. package/dist/1567.jclic-node.js +0 -2313
  19. package/dist/1567.jclic-node.js.map +0 -1
  20. package/dist/1588.jclic-node.js +0 -602
  21. package/dist/1588.jclic-node.js.map +0 -1
  22. package/dist/1725.jclic-node.js +0 -836
  23. package/dist/1725.jclic-node.js.map +0 -1
  24. package/dist/1731.jclic-node.js +0 -438
  25. package/dist/1731.jclic-node.js.map +0 -1
  26. package/dist/1842.jclic-node.js +0 -651
  27. package/dist/1842.jclic-node.js.map +0 -1
  28. package/dist/2160.jclic-node.js +0 -1016
  29. package/dist/2160.jclic-node.js.map +0 -1
  30. package/dist/222.jclic-node.js +0 -129
  31. package/dist/222.jclic-node.js.map +0 -1
  32. package/dist/2316.jclic-node.js +0 -949
  33. package/dist/2316.jclic-node.js.map +0 -1
  34. package/dist/2355.jclic-node.js +0 -371
  35. package/dist/2355.jclic-node.js.map +0 -1
  36. package/dist/2366.jclic-node.js +0 -431
  37. package/dist/2366.jclic-node.js.map +0 -1
  38. package/dist/2379.jclic-node.js +0 -202
  39. package/dist/2379.jclic-node.js.map +0 -1
  40. package/dist/2437.jclic-node.js +0 -450
  41. package/dist/2437.jclic-node.js.map +0 -1
  42. package/dist/2531.jclic-node.js +0 -869
  43. package/dist/2531.jclic-node.js.map +0 -1
  44. package/dist/2608.jclic-node.js +0 -160
  45. package/dist/2608.jclic-node.js.map +0 -1
  46. package/dist/2715.jclic-node.js +0 -554
  47. package/dist/2715.jclic-node.js.map +0 -1
  48. package/dist/277.jclic-node.js +0 -22
  49. package/dist/277.jclic-node.js.map +0 -1
  50. package/dist/2921.jclic-node.js +0 -660
  51. package/dist/2921.jclic-node.js.map +0 -1
  52. package/dist/2952.jclic-node.js +0 -101
  53. package/dist/2952.jclic-node.js.map +0 -1
  54. package/dist/3018.jclic-node.js +0 -421
  55. package/dist/3018.jclic-node.js.map +0 -1
  56. package/dist/3019.jclic-node.js +0 -682
  57. package/dist/3019.jclic-node.js.map +0 -1
  58. package/dist/3231.jclic-node.js +0 -274
  59. package/dist/3231.jclic-node.js.map +0 -1
  60. package/dist/331.jclic-node.js +0 -115
  61. package/dist/331.jclic-node.js.map +0 -1
  62. package/dist/3391.jclic-node.js +0 -276
  63. package/dist/3391.jclic-node.js.map +0 -1
  64. package/dist/3502.jclic-node.js +0 -671
  65. package/dist/3502.jclic-node.js.map +0 -1
  66. package/dist/3653.jclic-node.js +0 -982
  67. package/dist/3653.jclic-node.js.map +0 -1
  68. package/dist/371.jclic.min.js +0 -2
  69. package/dist/371.jclic.min.js.map +0 -1
  70. package/dist/3856.jclic-node.js +0 -575
  71. package/dist/3856.jclic-node.js.map +0 -1
  72. package/dist/4112.jclic-node.js +0 -659
  73. package/dist/4112.jclic-node.js.map +0 -1
  74. package/dist/4123.jclic-node.js +0 -910
  75. package/dist/4123.jclic-node.js.map +0 -1
  76. package/dist/427.jclic-node.js +0 -894
  77. package/dist/427.jclic-node.js.map +0 -1
  78. package/dist/4483.jclic-node.js +0 -327
  79. package/dist/4483.jclic-node.js.map +0 -1
  80. package/dist/4548.jclic-node.js +0 -1078
  81. package/dist/4548.jclic-node.js.map +0 -1
  82. package/dist/466.jclic-node.js +0 -99
  83. package/dist/466.jclic-node.js.map +0 -1
  84. package/dist/485.jclic-node.js +0 -783
  85. package/dist/485.jclic-node.js.map +0 -1
  86. package/dist/4921.jclic-node.js +0 -500
  87. package/dist/4921.jclic-node.js.map +0 -1
  88. package/dist/5091.jclic-node.js +0 -239
  89. package/dist/5091.jclic-node.js.map +0 -1
  90. package/dist/520.jclic-node.js +0 -550
  91. package/dist/520.jclic-node.js.map +0 -1
  92. package/dist/5312.jclic-node.js +0 -1126
  93. package/dist/5312.jclic-node.js.map +0 -1
  94. package/dist/5338.jclic-node.js +0 -212
  95. package/dist/5338.jclic-node.js.map +0 -1
  96. package/dist/5344.jclic-node.js +0 -229
  97. package/dist/5344.jclic-node.js.map +0 -1
  98. package/dist/5550.jclic-node.js +0 -238
  99. package/dist/5550.jclic-node.js.map +0 -1
  100. package/dist/5626.jclic-node.js +0 -614
  101. package/dist/5626.jclic-node.js.map +0 -1
  102. package/dist/5977.jclic-node.js +0 -1081
  103. package/dist/5977.jclic-node.js.map +0 -1
  104. package/dist/6148.jclic-node.js +0 -345
  105. package/dist/6148.jclic-node.js.map +0 -1
  106. package/dist/6176.jclic-node.js +0 -481
  107. package/dist/6176.jclic-node.js.map +0 -1
  108. package/dist/6221.jclic-node.js +0 -1072
  109. package/dist/6221.jclic-node.js.map +0 -1
  110. package/dist/6238.jclic-node.js +0 -718
  111. package/dist/6238.jclic-node.js.map +0 -1
  112. package/dist/6454.jclic-node.js +0 -1413
  113. package/dist/6454.jclic-node.js.map +0 -1
  114. package/dist/6565.jclic-node.js +0 -294
  115. package/dist/6565.jclic-node.js.map +0 -1
  116. package/dist/6579.jclic-node.js +0 -719
  117. package/dist/6579.jclic-node.js.map +0 -1
  118. package/dist/6715.jclic-node.js +0 -148
  119. package/dist/6715.jclic-node.js.map +0 -1
  120. package/dist/6777.jclic-node.js +0 -171
  121. package/dist/6777.jclic-node.js.map +0 -1
  122. package/dist/6782.jclic-node.js +0 -1611
  123. package/dist/6782.jclic-node.js.map +0 -1
  124. package/dist/6847.jclic-node.js +0 -601
  125. package/dist/6847.jclic-node.js.map +0 -1
  126. package/dist/6856.jclic-node.js +0 -252
  127. package/dist/6856.jclic-node.js.map +0 -1
  128. package/dist/696.jclic-node.js +0 -1821
  129. package/dist/696.jclic-node.js.map +0 -1
  130. package/dist/698.jclic-node.js +0 -583
  131. package/dist/698.jclic-node.js.map +0 -1
  132. package/dist/704.jclic-node.js +0 -80
  133. package/dist/704.jclic-node.js.map +0 -1
  134. package/dist/7046.jclic-node.js +0 -735
  135. package/dist/7046.jclic-node.js.map +0 -1
  136. package/dist/7220.jclic-node.js +0 -156
  137. package/dist/7220.jclic-node.js.map +0 -1
  138. package/dist/7257.jclic-node.js +0 -931
  139. package/dist/7257.jclic-node.js.map +0 -1
  140. package/dist/743.jclic-node.js +0 -583
  141. package/dist/743.jclic-node.js.map +0 -1
  142. package/dist/757.jclic-node.js +0 -1072
  143. package/dist/757.jclic-node.js.map +0 -1
  144. package/dist/7781.jclic-node.js +0 -202
  145. package/dist/7781.jclic-node.js.map +0 -1
  146. package/dist/7912.jclic-node.js +0 -2103
  147. package/dist/7912.jclic-node.js.map +0 -1
  148. package/dist/827.jclic-node.js +0 -708
  149. package/dist/827.jclic-node.js.map +0 -1
  150. package/dist/8276.jclic-node.js +0 -409
  151. package/dist/8276.jclic-node.js.map +0 -1
  152. package/dist/8322.jclic-node.js +0 -498
  153. package/dist/8322.jclic-node.js.map +0 -1
  154. package/dist/8641.jclic-node.js +0 -360
  155. package/dist/8641.jclic-node.js.map +0 -1
  156. package/dist/8837.jclic-node.js +0 -651
  157. package/dist/8837.jclic-node.js.map +0 -1
  158. package/dist/8895.jclic-node.js +0 -151
  159. package/dist/8895.jclic-node.js.map +0 -1
  160. package/dist/9072.jclic-node.js +0 -1285
  161. package/dist/9072.jclic-node.js.map +0 -1
  162. package/dist/9078.jclic-node.js +0 -935
  163. package/dist/9078.jclic-node.js.map +0 -1
  164. package/dist/9103.jclic-node.js +0 -718
  165. package/dist/9103.jclic-node.js.map +0 -1
  166. package/dist/9359.jclic-node.js +0 -145
  167. package/dist/9359.jclic-node.js.map +0 -1
  168. package/dist/9409.jclic-node.js +0 -921
  169. package/dist/9409.jclic-node.js.map +0 -1
  170. package/dist/9513.jclic-node.js +0 -720
  171. package/dist/9513.jclic-node.js.map +0 -1
  172. package/dist/9704.jclic-node.js +0 -81
  173. package/dist/9704.jclic-node.js.map +0 -1
  174. package/dist/9950.jclic-node.js +0 -827
  175. package/dist/9950.jclic-node.js.map +0 -1
@@ -1,935 +0,0 @@
1
- "use strict";
2
- exports.id = 9078;
3
- exports.ids = [9078,3018];
4
- exports.modules = {
5
-
6
- /***/ 9205:
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 BoxBag */
13
- /* harmony import */ var _AbstractBox_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9513);
14
- /* harmony import */ var _AWT_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7912);
15
- /* harmony import */ var _Utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1253);
16
- /**
17
- * File : boxes/BoxBag.js
18
- * Created : 21/04/2015
19
- * By : Francesc Busquets <francesc@gmail.com>
20
- *
21
- * JClic.js
22
- * An HTML5 player of JClic activities
23
- * https://projectestac.github.io/jclic.js
24
- *
25
- * @source https://github.com/projectestac/jclic.js
26
- *
27
- * @license EUPL-1.2
28
- * @licstart
29
- * (c) 2000-2020 Catalan Educational Telematic Network (XTEC)
30
- *
31
- * Licensed under the EUPL, Version 1.1 or -as soon they will be approved by
32
- * the European Commission- subsequent versions of the EUPL (the "Licence");
33
- * You may not use this work except in compliance with the Licence.
34
- *
35
- * You may obtain a copy of the Licence at:
36
- * https://joinup.ec.europa.eu/software/page/eupl
37
- *
38
- * Unless required by applicable law or agreed to in writing, software
39
- * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT
40
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
41
- * Licence for the specific language governing permissions and limitations
42
- * under the Licence.
43
- * @licend
44
- * @module
45
- */
46
-
47
-
48
-
49
-
50
-
51
- /**
52
- * BoxBag is a class derived from {@link module:boxes/AbstractBox.AbstractBox AbstractBox} that contains a collection of "boxes"
53
- * (objects also derived from {@link module:boxes/AbstractBox.AbstractBox AbstractBox}). This class implements methods to add, remove
54
- * and retrieve boxes, and to manage some of its properties like visibility, status, location and size.
55
- * @extends module:boxes/AbstractBox.AbstractBox
56
- */
57
- class BoxBag extends _AbstractBox_js__WEBPACK_IMPORTED_MODULE_0__["default"] {
58
- /**
59
- * BoxBag constructor
60
- * @param {module:boxes/AbstractBox.AbstractBox} [parent] - The AbstractBox to which this box bag belongs
61
- * @param {module:AWT.Container} [container] - The container where this box bag is placed.
62
- * @param {module:boxes/BoxBase.BoxBase} [boxBase] - The object where colors, fonts, border and other graphic properties
63
- */
64
- constructor(parent, container, boxBase) {
65
- // BoxBag extends AbstractBox
66
- super(parent, container, boxBase);
67
- this.preferredBounds = new _AWT_js__WEBPACK_IMPORTED_MODULE_1__/* .Rectangle */ .M_();
68
- this.cells = [];
69
- }
70
-
71
- /**
72
- * Static method that sets the position and dimension of a `Resizable` object based on a
73
- * preferred maximum dimension and a margin.
74
- * @param {module:AWT.Dimension} preferredMaxSize - The preferred maximum size
75
- * @param {Resizable} rs - A resizable object implementing the methods described in the
76
- * {@link http://projectestac.github.io/jclic/apidoc/edu/xtec/jclic/boxes/Resizable.html Resizable}
77
- * interface of JClic. Currently a {@link module:boxes/BoxBag.BoxBag BoxBag} or {@link module:boxes/TextGrid.TextGrid TextGrid}.
78
- * @param {number} margin - The margin between the available area and the BoxBag
79
- * @returns {module:AWT.Dimension} - The resulting size of the container
80
- */
81
- static layoutSingle(preferredMaxSize, rs, margin) {
82
-
83
- // Avoid exceptions when rs is null
84
- if (!rs)
85
- return preferredMaxSize;
86
-
87
- // optimal, maximal and minimal dimensions
88
- let
89
- d = rs.getPreferredSize(),
90
- minSize = rs.getMinimumSize(),
91
- maxSize = preferredMaxSize;
92
-
93
- // remove margins
94
- maxSize.width -= 2 * margin;
95
- maxSize.height -= 2 * margin;
96
- // correct maxSize if less than minSize
97
- if (minSize.width > maxSize.width || minSize.height > maxSize.height) {
98
- maxSize = minSize;
99
- }
100
- // compute scale factor
101
- let scale = d.width > maxSize.width ? maxSize.width / d.width : 1;
102
- if (scale * d.height > maxSize.height)
103
- scale = maxSize.height / d.height;
104
-
105
- // resize the `Resizable` object
106
- d = rs.getScaledSize(scale);
107
- rs.setBounds(margin, margin, d.width, d.height);
108
-
109
- // restore margins
110
- d.width += 2 * margin;
111
- d.height += 2 * margin;
112
-
113
- return d;
114
- }
115
-
116
- /**
117
- * Static method that sets the position and dimension of two `Resizable` objects based on a
118
- * preferred maximum size, a layout schema and a margin.
119
- * @param {module:AWT.Dimension} desiredMaxSize - The preferred maximum size
120
- * @param {Resizable} rsA - First resizable object implementing the methods described in the
121
- * {@link http://projectestac.github.io/jclic/apidoc/edu/xtec/jclic/boxes/Resizable.html Resizable}
122
- * interface of JClic. Currently a {@link module:boxes/BoxBag.BoxBag BoxBag} or {@link module:boxes/TextGrid.TextGrid TextGrid}.
123
- * @param {Resizable} rsB - Second resizable object
124
- * @param {string} boxGridPos - The layout schema. Possible values are:
125
- * - "AB" (_A_ at left, _B_ at right)
126
- * - "BA" (_B_ at left, _A_ at right)
127
- * - "AUB" (_A_ above _B_)
128
- * - "BUA" (_A_ below _B_).
129
- * @param {number} margin - The margin between the available area and the BoxBag
130
- * @returns {module:AWT.Dimension} - The resulting size of the container
131
- */
132
- static layoutDouble(desiredMaxSize, rsA, rsB, boxGridPos, margin) {
133
- // number of horizontal and vertical grid lines
134
- let
135
- isHLayout = false,
136
- nbh = 1,
137
- nbv = 1;
138
- switch (boxGridPos) {
139
- case 'AB':
140
- case 'BA':
141
- nbh = 2;
142
- nbv = 1;
143
- isHLayout = true;
144
- break;
145
- case 'AUB':
146
- case 'BUA':
147
- nbh = 1;
148
- nbv = 2;
149
- isHLayout = false;
150
- break;
151
- }
152
- const
153
- ra = rsA.getBounds(),
154
- rb = rsB.getBounds();
155
-
156
- // optimal dimensions
157
- let
158
- da = rsA.getPreferredSize(),
159
- db = rsB.getPreferredSize();
160
-
161
- const d = new _AWT_js__WEBPACK_IMPORTED_MODULE_1__/* .Dimension */ .fg(
162
- isHLayout ? da.width + db.width : Math.max(da.width, db.width),
163
- isHLayout ? Math.max(da.height, db.height) : da.height + db.height
164
- );
165
-
166
- // minimal dimensions
167
- const
168
- minSizeA = rsA.getMinimumSize(),
169
- minSizeB = rsB.getMinimumSize(),
170
- minSize = new _AWT_js__WEBPACK_IMPORTED_MODULE_1__/* .Dimension */ .fg(
171
- isHLayout ? minSizeA.width + minSizeB.width : Math.max(minSizeA.width, minSizeB.width),
172
- isHLayout ? Math.max(minSizeA.height, minSizeB.height) : minSizeA.height + minSizeB.height
173
- ),
174
- maxSize = desiredMaxSize;
175
-
176
- // remove margins
177
- maxSize.width -= (1 + nbh) * margin;
178
- maxSize.height -= (1 + nbv) * margin;
179
-
180
- // correct maxSize if less than minSize
181
- if (minSize.width > maxSize.width || minSize.height > maxSize.height)
182
- maxSize.setDimension(minSize);
183
-
184
- // compute scale factor
185
- let scale = d.width > maxSize.width ? maxSize.width / d.width : 1;
186
- if (scale * d.height > maxSize.height)
187
- scale = maxSize.height / d.height;
188
-
189
- //
190
- // correct possible minimal infractions
191
- // ...
192
- // resize
193
- da = rsA.getScaledSize(scale);
194
- db = rsB.getScaledSize(scale);
195
-
196
- // set margins to center one box relative to the other
197
- let
198
- dah = db.width > da.width ? (db.width - da.width) / 2 : 0,
199
- dbh = da.width > db.width ? (da.width - db.width) / 2 : 0,
200
- dav = db.height > da.height ? (db.height - da.height) / 2 : 0,
201
- dbv = da.height > db.height ? (da.height - db.height) / 2 : 0;
202
-
203
- switch (boxGridPos) {
204
- case 'AB':
205
- rsA.setBounds(margin, margin + dav, da.width, da.height);
206
- rsB.setBounds(2 * margin + da.width, margin + dbv, db.width, db.height);
207
- break;
208
- case 'BA':
209
- rsB.setBounds(margin, margin + dbv, db.width, db.height);
210
- rsA.setBounds(2 * margin + db.width, margin + dav, da.width, da.height);
211
- break;
212
- case 'AUB':
213
- rsA.setBounds(margin + dah, margin, da.width, da.height);
214
- rsB.setBounds(margin + dbh, 2 * margin + da.height, db.width, db.height);
215
- break;
216
- case 'BUA':
217
- rsB.setBounds(margin + dbh, margin, db.width, db.height);
218
- rsA.setBounds(margin + dah, 2 * margin + db.height, da.width, da.height);
219
- break;
220
- default:
221
- rsA.setBounds(
222
- Math.round(margin + scale * ra.pos.x),
223
- Math.round(margin + scale * ra.pos.y),
224
- da.width, da.height);
225
- rsB.setBounds(
226
- Math.round(margin + scale * rb.pos.x),
227
- Math.round(margin + scale * rb.pos.y),
228
- da.width, da.height);
229
- break;
230
- }
231
-
232
- // recompute 'd' adding margins
233
- const r = new _AWT_js__WEBPACK_IMPORTED_MODULE_1__/* .Rectangle */ .M_(rsA.getBounds());
234
- r.add(rsB.getBounds());
235
- d.width = r.dim.width + 2 * margin;
236
- d.height = r.dim.height + 2 * margin;
237
-
238
- return d;
239
- }
240
-
241
- /**
242
- * Gets the preferred size of this `BoxBag`
243
- * @returns {module:AWT.Dimension}
244
- */
245
- getPreferredSize() {
246
- return this.preferredBounds.dim;
247
- }
248
-
249
- /**
250
- * Gets the minimum size requested by this `BoxBag`
251
- * @returns {module:AWT.Dimension}
252
- */
253
- getMinimumSize() {
254
- const d = this.getPreferredSize();
255
- return new _AWT_js__WEBPACK_IMPORTED_MODULE_1__/* .Dimension */ .fg(
256
- Math.max(_Utils_js__WEBPACK_IMPORTED_MODULE_2__/* .settings */ .W0.MIN_CELL_SIZE, d.width),
257
- Math.max(_Utils_js__WEBPACK_IMPORTED_MODULE_2__/* .settings */ .W0.MIN_CELL_SIZE, d.height));
258
- }
259
-
260
- /**
261
- * Scales the current size of this box bag, multiplying all values by a specific factor
262
- * @param {number} scale - The scale factor
263
- * @returns {module:AWT.Dimension}
264
- */
265
- getScaledSize(scale) {
266
- const d = this.getPreferredSize();
267
- return new _AWT_js__WEBPACK_IMPORTED_MODULE_1__/* .Dimension */ .fg(Math.round(scale * d.width), Math.round(scale * d.height));
268
- }
269
-
270
- /**
271
- * Adds an {@link module:boxes/AbstractBox.AbstractBox AbstractBox} to the collection of cells
272
- * @param {module:boxes/AbstractBox.AbstractBox} bx - The box to add
273
- */
274
- addBox(bx) {
275
- this.cells.push(bx);
276
- bx.setParent(this);
277
-
278
- if (this.cells.length === 1)
279
- _AWT_js__WEBPACK_IMPORTED_MODULE_1__/* .Rectangle */ .M_.prototype.setBounds.call(this, bx);
280
- else
281
- this.add(bx);
282
-
283
- this.preferredBounds.setBounds(this.getBounds());
284
- }
285
-
286
- /**
287
- * Returns the index of a specific box in the `cells` array
288
- * @param {module:boxes/AbstractBox.AbstractBox} bx
289
- * @returns {number}
290
- */
291
- boxIndex(bx) {
292
- return bx === null ? -1 : this.cells.indexOf(bx);
293
- }
294
-
295
- /**
296
- * Returns the box at a specific index in the `cells` array
297
- * @param {number} n - The index
298
- * @returns {module:boxes/AbstractBox.AbstractBox}
299
- */
300
- getBox(n) {
301
- return n < 0 || n >= this.cells.length ? null : this.cells[n];
302
- }
303
-
304
- /**
305
- * Gets the background box
306
- * @returns {module:boxes/AbstractBox.AbstractBox}
307
- */
308
- getBackgroundBox() {
309
- return this.backgroundBox;
310
- }
311
-
312
- /**
313
- * Sets the background box
314
- * @param {module:boxes/AbstractBox.AbstractBox} bx
315
- */
316
- setBackgroundBox(bx) {
317
- this.backgroundBox = bx;
318
- if (bx !== null) {
319
- bx.setParent(this);
320
- bx.isBackground = true;
321
- }
322
- // Add the `backgroundbox` rectangle to the global BoxBag rectangle
323
- _AWT_js__WEBPACK_IMPORTED_MODULE_1__/* .Rectangle */ .M_.prototype.add.call(this, bx);
324
- this.preferredBounds.setBounds(this.getBounds());
325
- }
326
-
327
- /**
328
- * Recalculates the total size of this BoxBag (useful after direct additions o deletions of
329
- * elements in the `cells` array).
330
- * Updates `preferredBounds` and the current position and size of the box bag.
331
- */
332
- recalcSize() {
333
- let r = this.backgroundBox ? new _AWT_js__WEBPACK_IMPORTED_MODULE_1__/* .Rectangle */ .M_(this.backgroundBox.pos, this.backgroundBox.dim) : null;
334
- this.cells.forEach(cell => {
335
- if (!r)
336
- r = new _AWT_js__WEBPACK_IMPORTED_MODULE_1__/* .Rectangle */ .M_(cell.pos, cell.dim);
337
- else
338
- r.add(cell);
339
- });
340
- if (!r)
341
- r = new _AWT_js__WEBPACK_IMPORTED_MODULE_1__/* .Rectangle */ .M_(this.pos.x, this.pos.y, 0, 0);
342
- this.preferredBounds.setRect(r);
343
- this.x = r.pos.x;
344
- this.y = r.pos.y;
345
- this.dim.width = r.dim.width;
346
- this.dim.height = r.dim.height;
347
- }
348
-
349
- /**
350
- * Returns the number of cells stored in this BoxBag
351
- * @returns {number}
352
- */
353
- getNumCells() {
354
- return this.cells.length;
355
- }
356
-
357
- /**
358
- * Sets the specified key - value pair to all cells of this bag.
359
- * @param {string} key - The key to be established
360
- * @param {any} value - The value, of any type
361
- */
362
- setCellAttr(key, value) {
363
- this.cells.forEach(bx => bx[key] = value);
364
- if (this.backgroundBox)
365
- this.backgroundBox[key] = value;
366
- }
367
-
368
- /**
369
- * Overrides {@link module:boxes/AbstractBox.AbstractBox#setBorder} iterating over all the cells stored in this box bag.
370
- * @override
371
- * @param {boolean} newVal - Whether to set or unset the border
372
- */
373
- setBorder(newVal) {
374
- this.cells.forEach(bx => bx.setBorder(newVal));
375
- }
376
-
377
- /**
378
- * Overrides {@link module:boxes/AbstractBox.AbstractBox#setVisible} iterating over all the cells stored in this box bag.
379
- * @override
380
- * @param {boolean} newVal - Whether to set the cells visible or not
381
- */
382
- setVisible(newVal) {
383
- this.cells.forEach(bx => bx.setVisible(newVal));
384
- }
385
-
386
- /**
387
- * Overrides {@link module:boxes/AbstractBox.AbstractBox#setAlternative} iterating over all the cells stored in this box bag.
388
- * @override
389
- * @param {boolean} newVal - Whether to set or unset the cells in "alternative" mode
390
- */
391
- setAlternative(newVal) {
392
- super.setAlternative(newVal);
393
- this.cells.forEach(bx => bx.setAlternative(newVal));
394
- }
395
-
396
- /**
397
- * Overrides {@link module:boxes/AbstractBox.AbstractBox#setBounds} adjusting the position and size of all cells
398
- * @override
399
- * @param {(AWT.Rectangle|number)} rect - An AWT.Rectangle object, or the `x` coordinate of the
400
- * upper-left corner of a new rectangle.
401
- * @param {number} [ry] - `y` coordinate of the upper-left corner of the new rectangle.
402
- * @param {number} [rw] - Width of the new rectangle.
403
- * @param {number} [rh] - Height of the new rectangle.
404
- */
405
- setBounds(rect, ry, rw, rh) {
406
- if (typeof rect === 'number') {
407
- // Arguments are co-ordinates and size
408
- rect = new _AWT_js__WEBPACK_IMPORTED_MODULE_1__/* .Rectangle */ .M_(rect, ry, rw, rh);
409
- }
410
- if (rect.getSurface() > 0 && !rect.equals(this)) {
411
- const
412
- scaleW = rect.dim.width / this.dim.width,
413
- scaleH = rect.dim.height / this.dim.height,
414
- dx = rect.pos.x - this.pos.x,
415
- dy = rect.pos.y - this.pos.y;
416
- this.cells.forEach(bx => {
417
- const p = new _AWT_js__WEBPACK_IMPORTED_MODULE_1__/* .Point */ .bR(bx.pos.x - this.pos.x, bx.pos.y - this.pos.y);
418
- bx.setBounds(
419
- dx + this.pos.x + scaleW * p.x,
420
- dy + this.pos.y + scaleH * p.y,
421
- scaleW * bx.dim.width,
422
- scaleH * bx.dim.height);
423
- // Clear pos0
424
- bx.pos0 = null;
425
- });
426
- if (this.backgroundBox !== null) {
427
- const
428
- bx = this.backgroundBox,
429
- p = new _AWT_js__WEBPACK_IMPORTED_MODULE_1__/* .Point */ .bR(bx.pos.x - this.pos.x, bx.pos.y - this.pos.y);
430
- bx.setBounds(
431
- dx + this.pos.x + scaleW * p.x,
432
- dy + this.pos.y + scaleH * p.y,
433
- scaleW * bx.dim.width,
434
- scaleH * bx.dim.height);
435
- }
436
- }
437
- super.setBounds(rect);
438
- }
439
-
440
- /**
441
- * Performs graphics operations for each cell.
442
- * Overrides {@link module:boxes/AbstractBox.AbstractBox#update}
443
- * @override
444
- * @param {external:CanvasRenderingContext2D} ctx - The canvas rendering context used to draw the
445
- * box contents.
446
- * @param {module:AWT.Rectangle} [dirtyRegion] - The area that must be repainted. `null` refers to the whole box.
447
- */
448
- update(ctx, dirtyRegion) {
449
- if (this.isEmpty() || !this.isVisible() || this.isTemporaryHidden())
450
- return false;
451
-
452
- if (dirtyRegion && !this.intersects(dirtyRegion))
453
- return false;
454
-
455
- if (this.backgroundBox !== null)
456
- this.backgroundBox.update(ctx, dirtyRegion);
457
-
458
- this.cells.forEach(bx => {
459
- if (!bx.isMarked())
460
- bx.update(ctx, dirtyRegion);
461
- });
462
-
463
- // Make a second loop to repaint marked cells
464
- this.cells.forEach(bx => {
465
- if (bx.isMarked())
466
- bx.update(ctx, dirtyRegion);
467
- });
468
- return true;
469
- }
470
-
471
- /**
472
- * Finds the first visible {@link module:boxes/AbstractBox.AbstractBox AbstractBox} located under the specified point
473
- * @param {module:AWT.Point} p
474
- * @returns {module:boxes/AbstractBox.AbstractBox}
475
- */
476
- findBox(p) {
477
- let result = null;
478
- for (let i = this.cells.length - 1; i >= 0; i--) {
479
- const bx = this.getBox(i);
480
- if (bx.isVisible() && bx.contains(p)) {
481
- result = bx;
482
- break;
483
- }
484
- }
485
- return result;
486
- }
487
-
488
- /**
489
- * Count the number of cells of this BoxBag that are in "inactive" state
490
- * @returns {number}
491
- */
492
- countInactiveCells() {
493
- return this.cells.reduce((n, bx) => bx.isInactive() ? ++n : n, 0);
494
- }
495
- }
496
-
497
- Object.assign(BoxBag.prototype, {
498
- /**
499
- * The array of cells
500
- * @name module:boxes/BoxBag.BoxBag#cells
501
- * @type {module:boxes/AbstractBox.AbstractBox[]} */
502
- cells: [],
503
- /**
504
- * Rectangle containing the preferred bounds of the BoxBag
505
- * @name module:boxes/BoxBag.BoxBag#preferredBounds
506
- * @type {module:AWT.Rectangle} */
507
- preferredBounds: new _AWT_js__WEBPACK_IMPORTED_MODULE_1__/* .Rectangle */ .M_(),
508
- /**
509
- * An optional box used as a background by this BoxBag
510
- * @name module:boxes/BoxBag.BoxBag#backgroundBox
511
- * @type {module:boxes/AbstractBox.AbstractBox} */
512
- backgroundBox: null,
513
- });
514
-
515
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BoxBag);
516
-
517
-
518
- /***/ }),
519
-
520
- /***/ 3018:
521
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
522
-
523
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
524
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
525
- /* harmony export */ });
526
- /* unused harmony export BoxBase */
527
- /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7750);
528
- /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
529
- /* harmony import */ var _Utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1253);
530
- /* harmony import */ var _AWT_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7912);
531
- /**
532
- * File : boxes/BoxBase.js
533
- * Created : 12/04/2015
534
- * By : Francesc Busquets <francesc@gmail.com>
535
- *
536
- * JClic.js
537
- * An HTML5 player of JClic activities
538
- * https://projectestac.github.io/jclic.js
539
- *
540
- * @source https://github.com/projectestac/jclic.js
541
- *
542
- * @license EUPL-1.2
543
- * @licstart
544
- * (c) 2000-2020 Catalan Educational Telematic Network (XTEC)
545
- *
546
- * Licensed under the EUPL, Version 1.1 or -as soon they will be approved by
547
- * the European Commission- subsequent versions of the EUPL (the "Licence");
548
- * You may not use this work except in compliance with the Licence.
549
- *
550
- * You may obtain a copy of the Licence at:
551
- * https://joinup.ec.europa.eu/software/page/eupl
552
- *
553
- * Unless required by applicable law or agreed to in writing, software
554
- * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT
555
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
556
- * Licence for the specific language governing permissions and limitations
557
- * under the Licence.
558
- * @licend
559
- * @module
560
- */
561
-
562
-
563
-
564
-
565
-
566
- const defaultValues = _Utils_js__WEBPACK_IMPORTED_MODULE_1__/* .settings */ .W0.BoxBase;
567
-
568
- /**
569
- * This class contains all the main visual attributes needed to draw {@link module:boxes/AbstractBox.AbstractBox AbstractBox} objects:
570
- * background and foreground colors, gradients, colors for special states (inactive, alternative,
571
- * disabled...), margins, fonts, border strokes, etc.
572
- *
573
- * Objects derived from {@link module:boxes/AbstractBox.AbstractBox AbstractBox} can have inheritance: boxes that act as "containers"
574
- * of other boxes (like {@link module:boxes/BoxBag.BoxBag BoxBag}). Most of the attributes of `BoxBase` can be `null`,
575
- * meaning that the value of the ancestor -or the default value if the box has no ancestors- must
576
- * be used.
577
- */
578
- class BoxBase {
579
- /**
580
- * BoxBase constructor
581
- * @param {module:boxes/BoxBase.BoxBase} [parent] - Another BoxBase object used to determine the value of properties not
582
- * locally set.
583
- */
584
- constructor(parent) {
585
- this.parent = parent || null;
586
- }
587
-
588
- /**
589
- * Loads the BoxBase settings from a specific JQuery XML element
590
- * @param {external:jQuery} $xml - The XML element to parse
591
- */
592
- setProperties($xml) {
593
- //
594
- // Read attributes
595
- (0,_Utils_js__WEBPACK_IMPORTED_MODULE_1__/* .attrForEach */ .GM)($xml.get(0).attributes, (name, val) => {
596
- switch (name) {
597
- case 'shadow':
598
- case 'transparent':
599
- this[name] = (0,_Utils_js__WEBPACK_IMPORTED_MODULE_1__/* .getBoolean */ .pW)(val, false);
600
- break;
601
- case 'margin':
602
- this[name] = Number(val);
603
- break;
604
- case 'borderStroke':
605
- this.borderStroke = new _AWT_js__WEBPACK_IMPORTED_MODULE_2__/* .Stroke */ .tc(Number(val));
606
- break;
607
- case 'markerStroke':
608
- this.markerStroke = new _AWT_js__WEBPACK_IMPORTED_MODULE_2__/* .Stroke */ .tc(Number(val));
609
- break;
610
- }
611
- });
612
- //
613
- // Read inner elements
614
- $xml.children().each((_n, child) => {
615
- const $node = jquery__WEBPACK_IMPORTED_MODULE_0___default()(child);
616
- switch (child.nodeName) {
617
- case 'font':
618
- this.font = (new _AWT_js__WEBPACK_IMPORTED_MODULE_2__/* .Font */ .KQ()).setProperties($node);
619
- break;
620
-
621
- case 'gradient':
622
- this.bgGradient = new _AWT_js__WEBPACK_IMPORTED_MODULE_2__/* .Gradient */ .Hf().setProperties($node);
623
- break;
624
-
625
- case 'color':
626
- this.textColor = (0,_Utils_js__WEBPACK_IMPORTED_MODULE_1__/* .checkColor */ .I4)($node.attr('foreground'), this.textColor);
627
- this.backColor = (0,_Utils_js__WEBPACK_IMPORTED_MODULE_1__/* .checkColor */ .I4)($node.attr('background'), this.backColor);
628
- this.shadowColor = (0,_Utils_js__WEBPACK_IMPORTED_MODULE_1__/* .checkColor */ .I4)($node.attr('shadow'), this.shadowColor);
629
- this.inactiveColor = (0,_Utils_js__WEBPACK_IMPORTED_MODULE_1__/* .checkColor */ .I4)($node.attr('inactive'), this.inactiveColor);
630
- this.alternativeColor = (0,_Utils_js__WEBPACK_IMPORTED_MODULE_1__/* .checkColor */ .I4)($node.attr('alternative'), this.alternativeColor);
631
- this.borderColor = (0,_Utils_js__WEBPACK_IMPORTED_MODULE_1__/* .checkColor */ .I4)($node.attr('border'), this.borderColor);
632
- break;
633
- }
634
- });
635
- return this;
636
- }
637
-
638
- /**
639
- * Gets a object with the basic attributes needed to rebuild this instance excluding functions,
640
- * parent references, constants and also attributes retaining the default value.
641
- * The resulting object is commonly usued to serialize elements in JSON format.
642
- * @returns {object} - The resulting object, with minimal attrributes
643
- */
644
- getAttributes() {
645
- return (0,_Utils_js__WEBPACK_IMPORTED_MODULE_1__/* .getAttr */ .iu)(this, [
646
- 'shadow', 'transparent', 'margin',
647
- 'borderStroke', 'markerStroke', // AWT.Stroke
648
- 'font', // AWT.Font
649
- 'bgGradient', // AWT.Gradient
650
- `textColor|${BoxBase.prototype.textColor}`,
651
- `backColor|${BoxBase.prototype.backColor}`,
652
- `shadowColor|${BoxBase.prototype.shadowColor}`,
653
- `inactiveColor|${BoxBase.prototype.inactiveColor}`,
654
- `alternativeColor|${BoxBase.prototype.alternativeColor}`,
655
- `borderColor|${BoxBase.prototype.borderColor}`,
656
- ]);
657
- }
658
-
659
- /**
660
- * Reads the properties of this BoxBase from a data object
661
- * @param {object} data - The data object to be parsed
662
- * @returns {module:boxes/BoxBase.BoxBase}
663
- */
664
- setAttributes(data) {
665
- return (0,_Utils_js__WEBPACK_IMPORTED_MODULE_1__/* .setAttr */ .ob)(this, data, [
666
- 'shadow', 'transparent', 'margin',
667
- { key: 'borderStroke', fn: _AWT_js__WEBPACK_IMPORTED_MODULE_2__/* .Stroke */ .tc },
668
- { key: 'markerStroke', fn: _AWT_js__WEBPACK_IMPORTED_MODULE_2__/* .Stroke */ .tc },
669
- { key: 'font', fn: _AWT_js__WEBPACK_IMPORTED_MODULE_2__/* .Font */ .KQ },
670
- { key: 'bgGradient', fn: _AWT_js__WEBPACK_IMPORTED_MODULE_2__/* .Gradient */ .Hf },
671
- 'textColor',
672
- 'backColor',
673
- 'shadowColor',
674
- 'inactiveColor',
675
- 'alternativeColor',
676
- 'borderColor',
677
- ]);
678
- }
679
-
680
- /**
681
- * Gets the value of the specified property, scanning down to parents and prototype if not defined.
682
- * @param {string} property - The property to retrieve
683
- * @returns {any} - The object or value associated to this property
684
- */
685
- get(property) {
686
- if (this.hasOwnProperty(property) || this.parent === null)
687
- return this[property];
688
- else
689
- return this.parent.get(property);
690
- }
691
-
692
- /**
693
- * Sets the value of a specific property.
694
- * @param {string} property - The property name.
695
- * @param {any} value - Depends on the type of property
696
- */
697
- set(property, value) {
698
- this[property] = value;
699
- return this;
700
- }
701
-
702
- /**
703
- * Gets the value of the specified property, scanning down to parents if not defined, and returning
704
- * always an own property (not from prototype)
705
- * @param {string} property - The property to retrieve
706
- * @returns {any} - The object or value associated to this property
707
- */
708
- getOwn(property) {
709
- if (this.hasOwnProperty(property))
710
- return this[property];
711
- else if (this.parent !== null)
712
- return this.parent.getOwn(property);
713
- else {
714
- if (typeof this[property] === 'object')
715
- this[property] = (0,_Utils_js__WEBPACK_IMPORTED_MODULE_1__/* .cloneObject */ .h2)(BoxBase.prototype[property]);
716
- else
717
- this[property] = BoxBase.prototype[property];
718
- }
719
- return this[property];
720
- }
721
-
722
- /**
723
- * Gets the properties defined in this BoxBase as a collection of CSS attributes
724
- * @param {object} [css] - An optional set of initial CSS properties
725
- * @param {boolean} [inactive=false] - When `true`, get CSS attributes for an inactive cell
726
- * @param {boolean} [inverse=false] - When `true`, get CSS attributes for an inverse cell
727
- * @param {boolean} [alternative=false] - When `true`, get CSS attributes for an alternative cell
728
- * @returns {object}
729
- */
730
- getCSS(css, inactive = false, inverse = false, alternative = false) {
731
- // (css will be created by [AWT.Font.toCss](AWT.html) if null or undefined)
732
- const font = this.get('font');
733
- css = font.toCss(css);
734
-
735
- css['color'] = inverse ? this.get('backColor')
736
- : alternative ? this.get('alternativeColor')
737
- : this.get('textColor');
738
-
739
- const transparent = this.get('transparent');
740
- css['background-color'] = transparent ? 'transparent'
741
- : inactive ? this.get('inactiveColor')
742
- : inverse ? this.get('textColor') : this.get('backColor');
743
-
744
- const bgGradient = this.get('bgGradient');
745
- if (bgGradient && !transparent)
746
- css['background-image'] = bgGradient.getCss();
747
-
748
- if (this.shadow === 1) {
749
- const delta = Math.max(1, Math.round(font.size / 10));
750
- const color = this.get('shadowColor');
751
- css['text-shadow'] = `${delta}px ${delta}px 3px ${color}`;
752
- }
753
- return css;
754
- }
755
-
756
- /**
757
- * This utility method computes the width and height of text lines rendered on an HTML
758
- * __canvas__ element, reducing the font size of the BoxBase as needed when they exceed the maximum
759
- * width and/or height.
760
- * @param {external:CanvasRenderingContext2D} ctx - The canvas rendering context used to draw the text.
761
- * @param {string} text - The text to drawn.
762
- * @param {number} maxWidth - Maximum width
763
- * @param {number} maxHeight - Maximum height
764
- * @returns {object[]} - An array of objects representing lines of text. Each object has a `text`
765
- * member with the text displayed in the line, and a `size` member with the line {@link module:AWT.Dimension}
766
- */
767
- prepareText(ctx, text, maxWidth, maxHeight) {
768
- const
769
- result = [],
770
- font = this.get('font'),
771
- height = font.getHeight();
772
- let totalHeight = 0;
773
-
774
- // divide the text in lines
775
- const lines = text.trim().split('\n');
776
- ctx.font = font.cssFont();
777
- for (let l = 0; l < lines.length; l++) {
778
- let line = lines[l].trim();
779
- let width = ctx.measureText(line).width;
780
- if (width > maxWidth) {
781
- // retain the last string offset that was inside maxWidth
782
- let
783
- lastOK = 0,
784
- lastOKWidth = 0;
785
- for (let p = 0; p < line.length; p++) {
786
- // Find next separator
787
- if ((0,_Utils_js__WEBPACK_IMPORTED_MODULE_1__/* .isSeparator */ .k$)(line[p])) {
788
- const w = ctx.measureText(line.substring(0, p).trim()).width;
789
- if (w > maxWidth)
790
- break;
791
- lastOK = p;
792
- lastOKWidth = w;
793
- }
794
- }
795
- if (lastOK > 0) {
796
- // Add a new line with the tail of the line
797
- lines.splice(l + 1, 0, line.substring(lastOK + 1).trim());
798
- // Adjust the current line
799
- line = lines[l] = line.substring(0, lastOK).trim();
800
- width = lastOKWidth;
801
- }
802
- else {
803
- // No solution found. Try resizing down the font.
804
- if (font.size > defaultValues.MIN_FONT_SIZE) {
805
- this.getOwn('font').zoom(-1);
806
- return this.prepareText(ctx, text, maxWidth, maxHeight);
807
- }
808
- }
809
- }
810
-
811
- // Add the line and the calculated dimension to `result`
812
- result.push({
813
- text: line,
814
- size: new _AWT_js__WEBPACK_IMPORTED_MODULE_2__/* .Dimension */ .fg(width, height)
815
- });
816
-
817
- totalHeight += height;
818
-
819
- if (totalHeight > maxHeight && font.size > defaultValues.MIN_FONT_SIZE) {
820
- // Max height exceeded. Try resizing down the font
821
- this.getOwn('font').zoom(-1);
822
- return this.prepareText(ctx, text, maxWidth, maxHeight);
823
- }
824
- }
825
- return result;
826
- }
827
- }
828
-
829
- Object.assign(BoxBase.prototype, {
830
- /**
831
- * The parent BoxBase object
832
- * @name module:boxes/BoxBase.BoxBase#parent
833
- * @type {module:boxes/BoxBase.BoxBase} */
834
- parent: null,
835
- /**
836
- * Default values
837
- * @name module:boxes/BoxBase.BoxBase#defaultValues
838
- * @type {object} */
839
- default: defaultValues,
840
- /**
841
- * Font size can be dynamically reduced to fit the available space if any element using this
842
- * `BoxBase` requests it. When this happen, this field contains the real font currently used
843
- * to draw text.
844
- * @name module:boxes/BoxBase.BoxBase#font
845
- * @type {module:AWT.Font} */
846
- font: new _AWT_js__WEBPACK_IMPORTED_MODULE_2__/* .Font */ .KQ(),
847
- /**
848
- * The current font size of this BoxBase. Can be dynamically adjusted when drawing.
849
- * @name module:boxes/BoxBase.BoxBase#dynFontSize
850
- * @type {number} */
851
- dynFontSize: 0,
852
- /**
853
- * Counts the number of times the `dynFontSize` has been reset. This is useful to avoid excessive
854
- * recursive loops searching the optimal font size.
855
- * @name module:boxes/BoxBase.BoxBase#resetFontCounter
856
- * @type {number} */
857
- resetFontCounter: 0,
858
- /**
859
- * The background color
860
- * @name module:boxes/BoxBase.BoxBase#backColor
861
- * @type {string} */
862
- backColor: defaultValues.BACK_COLOR,
863
- /**
864
- * The background gradient. Default is `null`.
865
- * @name module:boxes/BoxBase.BoxBase#bgGradient
866
- * @type {module:AWT.Gradient} */
867
- bgGradient: null,
868
- /**
869
- * The color used to write text.
870
- * @name module:boxes/BoxBase.BoxBase#textColor
871
- * @type {string} */
872
- textColor: defaultValues.TEXT_COLOR,
873
- /**
874
- * The color used to draw a shadow below regular text.
875
- * @name module:boxes/BoxBase.BoxBase#shadowColor
876
- * @type {string} */
877
- shadowColor: defaultValues.SHADOW_COLOR,
878
- /**
879
- * The color of the border.
880
- * @name module:boxes/BoxBase.BoxBase#borderColor
881
- * @type {string} */
882
- borderColor: defaultValues.BORDER_COLOR,
883
- /**
884
- * The color used to draw text when a cell is in `inactive` state.
885
- * @name module:boxes/BoxBase.BoxBase#inactiveColor
886
- * @type {string} */
887
- inactiveColor: defaultValues.INACTIVE_COLOR,
888
- /**
889
- * The color used to draw text when a cell is in `alternative` state.
890
- * @name module:boxes/BoxBase.BoxBase#alternativeColor
891
- * @type {string} */
892
- alternativeColor: defaultValues.ALTERNATIVE_COLOR,
893
- /**
894
- * Whether the text should have a shadow or not
895
- * @name module:boxes/BoxBase.BoxBase#shadow
896
- * @type {boolean} */
897
- shadow: false,
898
- /**
899
- * Whether the cell's background (and its hosted component, if any) should be transparent
900
- * @name module:boxes/BoxBase.BoxBase#transparent
901
- * @type {boolean} */
902
- transparent: false,
903
- /**
904
- * Wheter the cell's background should be painted or not. This property has no effect on
905
- * hosted components.
906
- * @name module:boxes/BoxBase.BoxBase#dontFill
907
- * @type {boolean} */
908
- dontFill: false,
909
- /**
910
- * The margin to respect between text elements and the limits of the cell or other elements.
911
- * @name module:boxes/BoxBase.BoxBase#textMargin
912
- * @type {number} */
913
- textMargin: defaultValues.AC_MARGIN,
914
- /**
915
- * The stroke used to draw the border.
916
- * @name module:boxes/BoxBase.BoxBase#borderStroke
917
- * @type {module:AWT.Stroke} */
918
- borderStroke: new _AWT_js__WEBPACK_IMPORTED_MODULE_2__/* .Stroke */ .tc(defaultValues.BORDER_STROKE_WIDTH),
919
- /**
920
- * The stroke used to draw a border around marked cells.
921
- * @name module:boxes/BoxBase.BoxBase#markerStroke
922
- * @type {module:AWT.Stroke} */
923
- markerStroke: new _AWT_js__WEBPACK_IMPORTED_MODULE_2__/* .Stroke */ .tc(defaultValues.MARKER_STROKE_WIDTH),
924
- });
925
-
926
- BoxBase.DEFAULT_BOX_BASE = new BoxBase();
927
-
928
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BoxBase);
929
-
930
-
931
- /***/ })
932
-
933
- };
934
- ;
935
- //# sourceMappingURL=9078.jclic-node.js.map