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,1413 +0,0 @@
1
- "use strict";
2
- exports.id = 6454;
3
- exports.ids = [6454,4548,7781,6148];
4
- exports.modules = {
5
-
6
- /***/ 6454:
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 exports ComplexAssociation, ComplexAssociationPanel */
13
- /* harmony import */ var _Activity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1567);
14
- /* harmony import */ var _AWT_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7912);
15
- /* harmony import */ var _SimpleAssociation_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4548);
16
- /**
17
- * File : activities/associations/ComplexAssociation.js
18
- * Created : 03/06/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 Educational Telematic Network of Catalonia (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
- /**
53
- * This is a special case of {@link module:activities/associations/SimpleAssociation.SimpleAssociation SimpleAssociation} where the elements of the 'secondary' panel
54
- * can have zero, one or more associated elements in the 'primary' panel.
55
- * @extends module:activities/associations/SimpleAssociation.SimpleAssociation
56
- */
57
- class ComplexAssociation extends _SimpleAssociation_js__WEBPACK_IMPORTED_MODULE_2__/* .SimpleAssociation */ .e {
58
- /**
59
- * ComplexAssociation constructor
60
- * @param {module:project/JClicProject.JClicProject} project - The JClic project to which this activity belongs
61
- */
62
- constructor(project) {
63
- super(project);
64
- this.useIdAss = true;
65
- }
66
-
67
- /**
68
- * Loads this object settings from an XML element
69
- * @override
70
- * @param {external:jQuery} $xml - The jQuery XML element to parse
71
- */
72
- setProperties($xml) {
73
- super.setProperties($xml);
74
- this.abc['primary'].avoidAllIdsNull(this.abc['secondary'].getNumCells());
75
- }
76
-
77
- /**
78
- * Retrieves the minimum number of actions needed to solve this activity.
79
- * @override
80
- * @returns {number}
81
- */
82
- getMinNumActions() {
83
- if (this.invAss)
84
- return this.abc['secondary'].getNumCells();
85
- else
86
- return this.abc['primary'].getNumCells() - this.nonAssignedCells;
87
- }
88
- }
89
-
90
- Object.assign(ComplexAssociation.prototype, {
91
- /**
92
- * Number of unassigned cells
93
- * @name module:activities/associations/ComplexAssociation.ComplexAssociation#nonAssignedCells
94
- * @type {number} */
95
- nonAssignedCells: 0,
96
- /**
97
- * Uses cell's `idAss` field to check if pairings match
98
- * @name module:activities/associations/ComplexAssociation.ComplexAssociation#useIdAss
99
- * @type {boolean} */
100
- useIdAss: false,
101
- });
102
-
103
- /**
104
- * The {@link module:Activity.ActivityPanel ActivityPanel} where {@link module:activities/associations/ComplexAssociation.ComplexAssociation ComplexAssociation} activities are played.
105
- * @extends module:activities/associations/SimpleAssociation.SimpleAssociationPanel
106
- */
107
- class ComplexAssociationPanel extends _SimpleAssociation_js__WEBPACK_IMPORTED_MODULE_2__/* .SimpleAssociationPanel */ .i {
108
- /**
109
- * ComplexAssociationPanel prototype
110
- * @param {module:Activity.Activity} act - The {@link module:Activity.Activity Activity} to which this Panel belongs
111
- * @param {module:JClicPlayer.JClicPlayer} ps - Any object implementing the methods defined in the
112
- * [PlayStation](http://projectestac.github.io/jclic/apidoc/edu/xtec/jclic/PlayStation.html) Java interface.
113
- * @param {external:jQuery} [$div] - The jQuery DOM element where this Panel will deploy
114
- */
115
- constructor(act, ps, $div) {
116
- super(act, ps, $div);
117
- }
118
-
119
- /**
120
- * Prepares the visual components of the activity
121
- * @override
122
- */
123
- buildVisualComponents() {
124
- super.buildVisualComponents();
125
-
126
- const
127
- abcA = this.act.abc['primary'],
128
- abcB = this.act.abc['secondary'];
129
-
130
- if (abcA && abcB) {
131
- if (this.act.invAss)
132
- this.invAssCheck = Array(abcB.getNumCells()).fill(false);
133
- this.bgA.setDefaultIdAss();
134
- this.act.nonAssignedCells = 0;
135
- this.bgA.cells.forEach(bx => {
136
- if (bx.idAss === -1) {
137
- this.act.nonAssignedCells++;
138
- bx.switchToAlt(this.ps);
139
- }
140
- });
141
- }
142
- }
143
-
144
- /**
145
- * Checks if all inverse associations are done
146
- * @returns {boolean}
147
- */
148
- checkInvAss() {
149
- if (!this.act.invAss || !this.invAssCheck)
150
- return false;
151
- return this.invAssCheck.every(chk => chk);
152
- }
153
-
154
- /**
155
- * Main handler used to process mouse, touch, keyboard and edit events
156
- * @override
157
- * @param {external:Event} event - The HTML event to be processed
158
- * @returns {boolean} - When this event handler returns `false`, jQuery will stop its
159
- * propagation through the DOM tree. See: {@link http://api.jquery.com/on}
160
- */
161
- processEvent(event) {
162
- if (this.bc && this.playing) {
163
- //
164
- // The [AWT.Point](AWT.html#Point) where the mouse or touch event has been originated
165
- // and two [ActiveBox](ActiveBox.html) pointers used for the [BoxConnector](BoxConnector.html)
166
- // `origin` and `dest` points.
167
- let p = null, bx1, bx2;
168
-
169
- //
170
- // _touchend_ event don't provide pageX nor pageY information
171
- if (event.type === 'touchend') {
172
- p = this.bc.active ? this.bc.dest.clone() : new _AWT_js__WEBPACK_IMPORTED_MODULE_1__/* .Point */ .bR();
173
- } else {
174
- // Touch events can have more than one touch, so `pageX` must be obtained from `touches[0]`
175
- let
176
- x = event.originalEvent && event.originalEvent.touches ? event.originalEvent.touches[0].pageX : event.pageX,
177
- y = event.originalEvent && event.originalEvent.touches ? event.originalEvent.touches[0].pageY : event.pageY;
178
- p = new _AWT_js__WEBPACK_IMPORTED_MODULE_1__/* .Point */ .bR(x - this.$div.offset().left, y - this.$div.offset().top);
179
- }
180
-
181
- let
182
- // Flag for tracking `mouseup` events
183
- up = false,
184
- // Flag for assuring that only one media plays per event (avoid event sounds overlapping
185
- // cell's media sounds)
186
- m = false,
187
- // Flag for tracking clicks on the background of grid A
188
- clickOnBg0 = false,
189
- // Array to be filled with actions to be executed at the end of event processing
190
- delayedActions = [];
191
-
192
- switch (event.type) {
193
- case 'touchcancel':
194
- // Canvel movement
195
- if (this.bc.active)
196
- this.bc.end();
197
- break;
198
-
199
- case 'mouseup':
200
- // Don't consider drag moves below 3 pixels. Can be a "trembling click"
201
- if (this.bc.active && p.distanceTo(this.bc.origin) <= 3) {
202
- break;
203
- }
204
- up = true;
205
- /* falls through */
206
- case 'touchend':
207
- case 'touchstart':
208
- case 'mousedown':
209
- if (!this.bc.active) {
210
- // New pairing starts
211
- //
212
- // Pairings can never start with a `mouseup` event
213
- if (up)
214
- break;
215
-
216
- this.ps.stopMedia(1);
217
- // Determine if click was done on panel A or panel B
218
- bx1 = this.bgA ? this.bgA.findActiveBox(p) : null;
219
- bx2 = this.bgB ? this.bgB.findActiveBox(p) : null;
220
- if (bx1 && bx1.idAss !== -1 && (!this.act.useOrder || bx1.idOrder === this.currentItem) ||
221
- !this.act.useOrder && bx2) {
222
- // Start the [BoxConnector](BoxConnector.html)
223
- if (this.act.dragCells)
224
- this.bc.begin(p, bx1 || bx2);
225
- else
226
- this.bc.begin(p);
227
- // Play cell media or event sound
228
- m = m || (bx1 || bx2).playMedia(this.ps, delayedActions);
229
- if (!m)
230
- this.playEvent('click');
231
- }
232
-
233
- // Move the focus to the opposite accessible group
234
- let bg = bx1 ? this.bgA : this.bgB;
235
- if (bg && bg.$accessibleDiv) {
236
- bg = bx1 ? this.bgB : this.bgA;
237
- if (bg && bg.$accessibleDiv)
238
- bg.$accessibleDiv.focus();
239
- }
240
- } else {
241
- this.ps.stopMedia(1);
242
- // Pairing completed
243
- //
244
- // Find the active boxes behind `bc.origin` and `p`
245
- const origin = this.bc.origin;
246
- this.bc.end();
247
- bx1 = this.bgA ? this.bgA.findActiveBox(origin) : null;
248
- if (bx1) {
249
- bx2 = this.bgB ? this.bgB.findActiveBox(p) : null;
250
- } else {
251
- bx2 = this.bgB ? this.bgB.findActiveBox(origin) : null;
252
- if (bx2) {
253
- bx1 = this.bgA ? this.bgA.findActiveBox(p) : null;
254
- clickOnBg0 = true;
255
- }
256
- }
257
- // Check if the pairing was correct
258
- if (bx1 && bx2 && bx1.idAss !== -1 && !bx2.isInactive() && this.act.abc['secondary']) {
259
- const
260
- src = bx1.getDescription(),
261
- dest = bx2.getDescription(),
262
- matchingDest = this.act.abc['secondary'].getActiveBoxContent(bx1.idAss);
263
- let ok = false;
264
-
265
- if (bx1.idAss === bx2.idOrder || bx2.getContent().isEquivalent(matchingDest, true)) {
266
- // Pairing was OK. Play media and disable involved cells
267
- ok = true;
268
- bx1.idAss = -1;
269
- if (this.act.abc['solvedPrimary']) {
270
- bx1.switchToAlt(this.ps);
271
- m = m || bx1.playMedia(this.ps, delayedActions);
272
- } else {
273
- if (clickOnBg0)
274
- m = m || bx1.playMedia(this.ps, delayedActions);
275
- else
276
- m = m || bx2.playMedia(this.ps, delayedActions);
277
- bx1.clear();
278
- }
279
- if (this.act.invAss) {
280
- this.invAssCheck[bx2.idOrder] = true;
281
- bx2.clear();
282
- }
283
- if (this.act.useOrder && this.bgA)
284
- // Load next item
285
- this.currentItem = this.bgA.getNextItem(this.currentItem);
286
- }
287
- // Check results and notify action
288
- if (this.bgA) {
289
- const cellsPlaced = this.bgA.countCellsWithIdAss(-1);
290
- this.ps.reportNewAction(this.act, 'MATCH', src, dest, ok, cellsPlaced - this.act.nonAssignedCells);
291
- // End activity or play event sound
292
- if (ok && (this.checkInvAss() || cellsPlaced === this.bgA.getNumCells()))
293
- this.finishActivity(true);
294
- else if (!m)
295
- this.playEvent(ok ? 'actionOk' : 'actionError');
296
- }
297
- } else if (this.bgB && (clickOnBg0 && this.bgA && this.bgA.contains(p) || !clickOnBg0 && this.bgB.contains(p))) {
298
- // click on grid, out of cell
299
- const srcOut = bx1 ? bx1.getDescription() : bx2 ? bx2.getDescription() : 'null';
300
- this.ps.reportNewAction(this.act, 'MATCH', srcOut, 'null', false, this.bgB.countCellsWithIdAss(-1));
301
- this.playEvent('actionError');
302
- }
303
- this.update();
304
-
305
- // Move the focus to the `source` accessible group
306
- if (this.bgA && this.bgA.$accessibleDiv)
307
- this.bgA.$accessibleDiv.focus();
308
- }
309
- break;
310
-
311
- case 'mousemove':
312
- case 'touchmove':
313
- this.bc.moveTo(p);
314
- break;
315
- }
316
- delayedActions.forEach(action => action());
317
- event.preventDefault();
318
- }
319
- }
320
- }
321
-
322
- Object.assign(ComplexAssociationPanel.prototype, {
323
- /**
324
- * Array for storing checked associations
325
- * @name module:activities/associations/ComplexAssociation.ComplexAssociationPanel#invAssCheck
326
- * @type {boolean[]} */
327
- invAssCheck: null,
328
- });
329
-
330
- /**
331
- * Panel class associated to this type of activity: {@link module:activities/associations/ComplexAssociation.ComplexAssociationPanel ComplexAssociationPanel}
332
- * @type {class} */
333
- ComplexAssociation.Panel = ComplexAssociationPanel;
334
-
335
- // Register activity class
336
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_Activity_js__WEBPACK_IMPORTED_MODULE_0__["default"].registerClass('@associations.ComplexAssociation', ComplexAssociation));
337
-
338
-
339
- /***/ }),
340
-
341
- /***/ 4548:
342
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
343
-
344
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
345
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
346
- /* harmony export */ e: () => (/* binding */ SimpleAssociation),
347
- /* harmony export */ i: () => (/* binding */ SimpleAssociationPanel)
348
- /* harmony export */ });
349
- /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7750);
350
- /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
351
- /* harmony import */ var _Activity_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1567);
352
- /* harmony import */ var _boxes_ActiveBoxGrid_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7781);
353
- /* harmony import */ var _boxes_BoxBag_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9205);
354
- /* harmony import */ var _boxes_BoxConnector_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6148);
355
- /* harmony import */ var _AWT_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(7912);
356
- /* harmony import */ var _Utils_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(1253);
357
- /**
358
- * File : activities/associations/SimpleAssociation.js
359
- * Created : 02/06/2015
360
- * By : Francesc Busquets <francesc@gmail.com>
361
- *
362
- * JClic.js
363
- * An HTML5 player of JClic activities
364
- * https://projectestac.github.io/jclic.js
365
- *
366
- * @source https://github.com/projectestac/jclic.js
367
- *
368
- * @license EUPL-1.2
369
- * @licstart
370
- * (c) 2000-2020 Catalan Educational Telematic Network (XTEC)
371
- *
372
- * Licensed under the EUPL, Version 1.1 or -as soon they will be approved by
373
- * the European Commission- subsequent versions of the EUPL (the "Licence");
374
- * You may not use this work except in compliance with the Licence.
375
- *
376
- * You may obtain a copy of the Licence at:
377
- * https://joinup.ec.europa.eu/software/page/eupl
378
- *
379
- * Unless required by applicable law or agreed to in writing, software
380
- * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT
381
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
382
- * Licence for the specific language governing permissions and limitations
383
- * under the Licence.
384
- * @licend
385
- * @module
386
- */
387
-
388
-
389
-
390
-
391
-
392
-
393
-
394
-
395
-
396
- /**
397
- * This class of {@link module:Activity.Activity Activity} uses two panels (`primary` and `secondary`) formed by
398
- * {@link module:boxes/ActiveBox.ActiveBox ActiveBox} objects filled with data stored in {@link module:boxes/ActiveBagContent.ActiveBagContent ActiveBagContent} repositories.
399
- *
400
- * Both panels have the same number of elements, associated one-to-one. A third {@link module:boxes/ActiveBagContent.ActiveBagContent ActiveBagContent}
401
- * can be used as alternative content, that will be revealed in the `primary` panel as the pairings
402
- * of its cells are solved.
403
- * @extends module:Activity.Activity
404
- */
405
- class SimpleAssociation extends _Activity_js__WEBPACK_IMPORTED_MODULE_1__/* .Activity */ .I {
406
- /**
407
- * SimpleAssociation constructor
408
- * @param {module:project/JClicProject.JClicProject} project - The JClic project to which this activity belongs
409
- */
410
- constructor(project) {
411
- super(project);
412
- }
413
-
414
- /**
415
- * Retrieves the minimum number of actions needed to solve this activity.
416
- * @override
417
- * @returns {number}
418
- */
419
- getMinNumActions() {
420
- return this.abc.primary.getNumCells();
421
- }
422
-
423
- /**
424
- * Whether or not the activity uses random to shuffle internal components
425
- * @override
426
- * @returns {boolean}
427
- */
428
- hasRandom() {
429
- return true;
430
- }
431
-
432
- /**
433
- * When `true`, the activity must always be shuffled
434
- * @override
435
- * @returns {boolean}
436
- */
437
- shuffleAlways() {
438
- return true;
439
- }
440
-
441
- /**
442
- * Whether the activity allows the user to request help.
443
- * @override
444
- * @returns {boolean}
445
- */
446
- helpSolutionAllowed() {
447
- return true;
448
- }
449
- }
450
-
451
- Object.assign(SimpleAssociation.prototype, {
452
- /**
453
- * When `true`, the cell's `idAss` field will be used to check pairing matches.
454
- * @name module:activities/associations/SimpleAssociation.SimpleAssociation#useIdAss
455
- * @type {boolean} */
456
- useIdAss: false,
457
- });
458
-
459
- /**
460
- * The {@link module:Activity.ActivityPanel ActivityPanel} where {@link module:activities/associations/SimpleAssociation.SimpleAssociation SimpleAssociation} activities are played.
461
- * @extends module:Activity.ActivityPanel ActivityPanel
462
- */
463
- class SimpleAssociationPanel extends _Activity_js__WEBPACK_IMPORTED_MODULE_1__/* .ActivityPanel */ .S {
464
- /**
465
- * SimpleAssociationPanel constructor
466
- * @param {module:Activity.Activity} act - The {@link module:Activity.Activity Activity} to which this Panel belongs
467
- * @param {module:JClicPlayer.JClicPlayer} ps - Any object implementing the methods defined in the
468
- * [PlayStation](http://projectestac.github.io/jclic/apidoc/edu/xtec/jclic/PlayStation.html) Java interface.
469
- * @param {external:jQuery} [$div] - The jQuery DOM element where this Panel will deploy
470
- */
471
- constructor(act, ps, $div) {
472
- super(act, ps, $div);
473
- }
474
-
475
- /**
476
- * Performs miscellaneous cleaning operations
477
- * @override
478
- */
479
- clear() {
480
- if (this.bgA) {
481
- this.bgA.end();
482
- this.bgA = null;
483
- }
484
- if (this.bgB) {
485
- this.bgB.end();
486
- this.bgB = null;
487
- }
488
- }
489
-
490
- /**
491
- * Prepares the visual components of the activity
492
- * @override
493
- */
494
- buildVisualComponents() {
495
- if (this.firstRun)
496
- super.buildVisualComponents();
497
-
498
- this.clear();
499
-
500
- const
501
- abcA = this.act.abc['primary'],
502
- abcB = this.act.abc['secondary'],
503
- solved = this.act.abc['solvedPrimary'];
504
-
505
- if (abcA && abcB) {
506
- if (abcA.image) {
507
- abcA.setImgContent(this.act.project.mediaBag, null, false);
508
- if (abcA.animatedGifFile && !abcA.shaper.rectangularShapes && !this.act.shuffleA)
509
- this.$animatedBg = jquery__WEBPACK_IMPORTED_MODULE_0___default()('<span/>').css({
510
- 'background-image': `url(${abcA.animatedGifFile})`,
511
- 'background-position': 'center',
512
- 'background-repeat': 'no-repeat',
513
- position: 'absolute'
514
- }).appendTo(this.$div);
515
- }
516
-
517
- if (abcB.image) {
518
- abcB.setImgContent(this.act.project.mediaBag, null, false);
519
- if (abcB.animatedGifFile && !abcB.shaper.rectangularShapes && !this.act.shuffleB)
520
- this.$animatedBgB = jquery__WEBPACK_IMPORTED_MODULE_0___default()('<span/>').css({
521
- 'background-image': `url(${abcB.animatedGifFile})`,
522
- 'background-position': 'center',
523
- 'background-repeat': 'no-repeat',
524
- position: 'absolute'
525
- }).appendTo(this.$div);
526
- }
527
-
528
- if (solved && solved.image)
529
- solved.setImgContent(this.act.project.mediaBag, null, false);
530
-
531
- if (this.act.acp !== null) {
532
- const contentKit = [abcA, abcB];
533
- if (solved)
534
- contentKit.push(solved);
535
- this.act.acp.generateContent(abcA.nch, abcA.ncw, contentKit, false);
536
- }
537
-
538
- this.bgA = _boxes_ActiveBoxGrid_js__WEBPACK_IMPORTED_MODULE_2__["default"].createEmptyGrid(null, this, this.act.margin, this.act.margin, abcA);
539
- this.bgB = _boxes_ActiveBoxGrid_js__WEBPACK_IMPORTED_MODULE_2__["default"].createEmptyGrid(null, this, this.act.margin, this.act.margin, abcB);
540
-
541
- this.bgA.setContent(abcA, solved ? solved : null);
542
- if (this.$animatedBg)
543
- this.bgA.setCellAttr('tmpTrans', true);
544
-
545
- this.bgB.setContent(abcB);
546
- if (this.$animatedBgB)
547
- this.bgB.setCellAttr('tmpTrans', true);
548
-
549
- this.bgA.accessibleText = (0,_Utils_js__WEBPACK_IMPORTED_MODULE_6__/* .getMsg */ .qG)('source');
550
- this.bgB.accessibleText = (0,_Utils_js__WEBPACK_IMPORTED_MODULE_6__/* .getMsg */ .qG)('target');
551
-
552
- this.bgA.setVisible(true);
553
- this.bgB.setVisible(true);
554
- }
555
- }
556
-
557
- /**
558
- * Basic initialization procedure
559
- * @override
560
- */
561
- initActivity() {
562
- super.initActivity();
563
- if (!this.firstRun)
564
- this.buildVisualComponents();
565
- else
566
- this.firstRun = false;
567
-
568
- if (this.bgA && this.bgB) {
569
- // Scramble cells
570
- const shuffleArray = [];
571
- if (this.act.shuffleA)
572
- shuffleArray.push(this.bgA);
573
- if (this.act.shuffleB)
574
- shuffleArray.push(this.bgB);
575
- if (shuffleArray.length > 0) {
576
- this.shuffle(shuffleArray, true, true);
577
- }
578
-
579
- if (this.useOrder)
580
- this.currentItem = this.bgA.getNextItem(-1);
581
-
582
- this.invalidate().update();
583
- this.setAndPlayMsg('initial', 'start');
584
- this.playing = true;
585
- }
586
- }
587
-
588
- /**
589
- * Updates the graphic content of this panel.
590
- * This method will be called from {@link module:AWT.Container#update} when needed.
591
- * @override
592
- * @param {module:AWT.Rectangle} dirtyRegion - Specifies the area to be updated. When `null`,
593
- * it's the whole panel.
594
- */
595
- updateContent(dirtyRegion) {
596
- super.updateContent(dirtyRegion);
597
- if (this.bgA && this.bgB && this.$canvas) {
598
- const
599
- canvas = this.$canvas.get(-1),
600
- ctx = canvas.getContext('2d');
601
- if (!dirtyRegion)
602
- dirtyRegion = new _AWT_js__WEBPACK_IMPORTED_MODULE_5__/* .Rectangle */ .M_(0, 0, canvas.width, canvas.height);
603
- ctx.clearRect(dirtyRegion.pos.x, dirtyRegion.pos.y, dirtyRegion.dim.width, dirtyRegion.dim.height);
604
- this.bgA.update(ctx, dirtyRegion);
605
- this.bgB.update(ctx, dirtyRegion);
606
- }
607
- return this;
608
- }
609
-
610
- /**
611
- * Sets the real dimension of this panel.
612
- * @override
613
- * @param {module:AWT.Dimension} preferredMaxSize - The maximum surface available for the activity panel
614
- * @returns {module:AWT.Dimension}
615
- */
616
- setDimension(preferredMaxSize) {
617
- return !this.bgA || !this.bgB || this.getBounds().equals(preferredMaxSize) ?
618
- preferredMaxSize :
619
- _boxes_BoxBag_js__WEBPACK_IMPORTED_MODULE_3__["default"].layoutDouble(preferredMaxSize, this.bgA, this.bgB, this.act.boxGridPos, this.act.margin);
620
- }
621
-
622
- /**
623
- * Sets the size and position of this activity panel
624
- * @override
625
- * @param {module:AWT.Rectangle} rect
626
- */
627
- setBounds(rect) {
628
- if (this.$canvas)
629
- this.$canvas.remove();
630
-
631
- super.setBounds(rect);
632
- if (this.bgA || this.bgB) {
633
- // Create the main canvas
634
- this.$canvas = jquery__WEBPACK_IMPORTED_MODULE_0___default()(`<canvas width="${rect.dim.width}" height="${rect.dim.height}"/>`).css({
635
- position: 'absolute',
636
- top: 0,
637
- left: 0
638
- });
639
- // Resize animated gif background A
640
- if (this.$animatedBg && this.bgA) {
641
- const bgRect = this.bgA.getBounds();
642
- this.$animatedBg.css({
643
- left: bgRect.pos.x,
644
- top: bgRect.pos.y,
645
- width: bgRect.dim.width + 'px',
646
- height: bgRect.dim.height + 'px',
647
- 'background-size': `${bgRect.dim.width}px ${bgRect.dim.height}px`
648
- });
649
- }
650
- // Resize animated gif background B
651
- if (this.$animatedBgB && this.bgB) {
652
- const bgRectB = this.bgB.getBounds();
653
- this.$animatedBgB.css({
654
- left: bgRectB.pos.x,
655
- top: bgRectB.pos.y,
656
- width: bgRectB.dim.width + 'px',
657
- height: bgRectB.dim.height + 'px',
658
- 'background-size': `${bgRectB.dim.width}px ${bgRectB.dim.height}px`
659
- });
660
- }
661
- this.$div.append(this.$canvas);
662
-
663
- // Create a [BoxConnector](BoxConnector.html) and attach it to the canvas context
664
- this.bc = new _boxes_BoxConnector_js__WEBPACK_IMPORTED_MODULE_4__["default"](this, this.$canvas);
665
-
666
- // Repaint all
667
- this.invalidate().update();
668
- }
669
- }
670
-
671
- /**
672
- * Builds the accessible components needed for this ActivityPanel
673
- * This method is called when all main elements are placed and visible, when the activity is ready
674
- * to start or when resized.
675
- * @override
676
- */
677
- buildAccessibleComponents() {
678
- if (this.$canvas && this.accessibleCanvas) {
679
- super.buildAccessibleComponents();
680
- if (this.bgA)
681
- this.bgA.buildAccessibleElements(this.$canvas, this.$div, 'mousedown');
682
- if (this.bgB)
683
- this.bgB.buildAccessibleElements(this.$canvas, this.$div, 'mousedown');
684
- }
685
- }
686
-
687
- /**
688
- * Main handler used to process mouse, touch, keyboard and edit events
689
- * @override
690
- * @param {external:Event} event - The HTML event to be processed
691
- * @returns {boolean} - When this event handler returns `false`, jQuery will stop its
692
- * propagation through the DOM tree. See: {@link http://api.jquery.com/on}
693
- */
694
- processEvent(event) {
695
- if (this.bc && this.playing) {
696
- //
697
- // The [AWT.Point](AWT.html#Point) where the mouse or touch event has been originated
698
- // and two [ActiveBox](ActiveBox.html) pointers used for the [BoxConnector](BoxConnector.html)
699
- // `origin` and `dest` points.
700
- let p = null, bx1, bx2;
701
- //
702
- // _touchend_ event don't provide pageX nor pageY information
703
- if (event.type === 'touchend')
704
- p = this.bc.active ? this.bc.dest.clone() : new _AWT_js__WEBPACK_IMPORTED_MODULE_5__/* .Point */ .bR();
705
- else {
706
- // Touch events can have more than one touch, so `pageX` must be obtained from `touches[0]`
707
- const
708
- x = event.originalEvent && event.originalEvent.touches ? event.originalEvent.touches[0].pageX : event.pageX,
709
- y = event.originalEvent && event.originalEvent.touches ? event.originalEvent.touches[0].pageY : event.pageY;
710
- p = new _AWT_js__WEBPACK_IMPORTED_MODULE_5__/* .Point */ .bR(x - this.$div.offset().left, y - this.$div.offset().top);
711
- }
712
-
713
- // Flag for tracking `mouseup` events
714
- let up = false,
715
- // Flag for assuring that only one media plays per event (avoid event sounds overlapping
716
- // cell's media sounds)
717
- m = false,
718
- // Flag for tracking clicks on the background of grid A
719
- clickOnBg0 = false,
720
- // Array to be filled with actions to be executed at the end of event processing
721
- delayedActions = [];
722
-
723
- switch (event.type) {
724
- case 'touchcancel':
725
- // Canvel movement
726
- if (this.bc.active)
727
- this.bc.end();
728
- break;
729
-
730
- case 'mouseup':
731
- // Don't consider drag moves below 3 pixels. Can be a "trembling click"
732
- if (this.bc.active && p.distanceTo(this.bc.origin) <= 3) {
733
- break;
734
- }
735
- up = true;
736
- /* falls through */
737
- case 'touchend':
738
- case 'touchstart':
739
- case 'mousedown':
740
- if (!this.bc.active) {
741
- // A new pairing starts
742
- //
743
- // Pairings can never start with a `mouseup` event
744
- if (up)
745
- break;
746
-
747
- this.ps.stopMedia(1);
748
- //
749
- // Determine if click was done on panel A or panel B
750
- bx1 = this.bgA ? this.bgA.findActiveBox(p) : null;
751
- bx2 = this.bgB ? this.bgB.findActiveBox(p) : null;
752
- if (bx1 && (!this.act.useOrder || bx1.idOrder === this.currentItem) ||
753
- !this.act.useOrder && bx2 && bx2.idAss !== -1) {
754
- // Start the [BoxConnector](BoxConnector.html)
755
- if (this.act.dragCells)
756
- this.bc.begin(p, bx1 || bx2);
757
- else
758
- this.bc.begin(p);
759
- // Play cell media or event sound
760
- m = m || (bx1 || bx2).playMedia(this.ps, delayedActions);
761
- if (!m)
762
- this.playEvent('click');
763
-
764
- // Move the focus to the opposite accessible group
765
- let bg = bx1 ? this.bgA : this.bgB;
766
- if (bg && bg.$accessibleDiv) {
767
- bg = bx1 ? this.bgB : this.bgA;
768
- if (bg && bg.$accessibleDiv)
769
- bg.$accessibleDiv.focus();
770
- }
771
- }
772
- } else {
773
- this.ps.stopMedia(1);
774
- // Pairing completed
775
- //
776
- // Find the active boxes behind `bc.origin` and `p`
777
- const origin = this.bc.origin;
778
- this.bc.end();
779
- bx1 = this.bgA ? this.bgA.findActiveBox(origin) : null;
780
- if (bx1) {
781
- bx2 = this.bgB ? this.bgB.findActiveBox(p) : null;
782
- } else {
783
- bx2 = this.bgB ? this.bgB.findActiveBox(origin) : null;
784
- if (bx2) {
785
- bx1 = this.bgA ? this.bgA.findActiveBox(p) : null;
786
- clickOnBg0 = true;
787
- }
788
- }
789
- // Check if the pairing was correct
790
- if (bx1 && bx2 && bx1.idAss !== -1 && bx2.idAss !== -1 && this.act.abc['secondary']) {
791
- let ok = false;
792
- const
793
- src = bx1.getDescription(),
794
- dest = bx2.getDescription(),
795
- matchingDest = this.act.abc['secondary'].getActiveBoxContent(bx1.idOrder);
796
- if (bx1.idOrder === bx2.idOrder || bx2.getContent().isEquivalent(matchingDest, true)) {
797
- // Pairing is OK. Play media and disable involved cells
798
- ok = true;
799
- bx1.idAss = -1;
800
- bx2.idAss = -1;
801
- if (this.act.abc['solvedPrimary']) {
802
- bx1.switchToAlt(this.ps);
803
- m = m || bx1.playMedia(this.ps, delayedActions);
804
- } else {
805
- if (clickOnBg0)
806
- m = m || bx1.playMedia(this.ps, delayedActions);
807
- else
808
- m = m || bx2.playMedia(this.ps, delayedActions);
809
- bx1.clear();
810
- }
811
- bx2.clear();
812
-
813
- if (this.act.useOrder && this.bgA)
814
- // Load next item
815
- this.currentItem = this.bgA.getNextItem(this.currentItem);
816
- }
817
- // Check results and notify action
818
- const cellsPlaced = this.bgB ? this.bgB.countCellsWithIdAss(-1) : 0;
819
- this.ps.reportNewAction(this.act, 'MATCH', src, dest, ok, cellsPlaced);
820
- // End activity or play event sound
821
- if (ok && cellsPlaced === this.bgB.getNumCells())
822
- this.finishActivity(true);
823
- else if (!m)
824
- this.playEvent(ok ? 'actionOk' : 'actionError');
825
- }
826
- this.update();
827
-
828
- // Move the focus to the `source` accessible group
829
- if (this.bgA && this.bgA.$accessibleDiv)
830
- this.bgA.$accessibleDiv.focus();
831
- }
832
- break;
833
-
834
- case 'mousemove':
835
- case 'touchmove':
836
- this.bc.moveTo(p);
837
- break;
838
- }
839
- delayedActions.forEach(action => action());
840
- event.preventDefault();
841
- }
842
- }
843
- }
844
-
845
- Object.assign(SimpleAssociationPanel.prototype, {
846
- /**
847
- * The {@link module:boxes/ActiveBoxbag.ActiveBoxBag ActiveBoxBag} object containing the information to be displayed in the `primary` panel
848
- * @name module:activities/associations/SimpleAssociation.SimpleAssociationPanel#bgA
849
- * @type {module:boxes/ActiveBoxBag.ActiveBoxBag} */
850
- bgA: null,
851
- /**
852
- * The {@link module:boxes/ActiveBoxbag.ActiveBoxBag ActiveBoxBag} object containing the information to be displayed in the `secondary` panel
853
- * @name module:activities/associations/SimpleAssociation.SimpleAssociationPanel#bgB
854
- * @type {module:boxes/ActiveBoxBag.ActiveBoxBag} */
855
- bgB: null,
856
- /**
857
- * The box connector
858
- * @name module:activities/associations/SimpleAssociation.SimpleAssociationPanel#bc
859
- * @type {module:boxes/BoxConnector.BoxConnector} */
860
- bc: null,
861
- /**
862
- * List of mouse, touch and keyboard events intercepted by this panel
863
- * @override
864
- * @name module:activities/associations/SimpleAssociation.SimpleAssociationPanel#events
865
- * @type {string[]} */
866
- events: ['mousedown', 'mouseup', 'mousemove', 'touchstart', 'touchend', 'touchmove', 'touchcancel'],
867
- });
868
-
869
- /**
870
- * Panel class associated to this type of activity: {@link module:activities/associations/SimpleAssociation.SimpleAssociationPanel SimpleAssociationPanel}
871
- * @type {class} */
872
- SimpleAssociation.Panel = SimpleAssociationPanel;
873
-
874
- // Register activity class
875
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_Activity_js__WEBPACK_IMPORTED_MODULE_1__/* .Activity */ .I.registerClass('@associations.SimpleAssociation', SimpleAssociation));
876
-
877
-
878
- /***/ }),
879
-
880
- /***/ 7781:
881
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
882
-
883
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
884
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
885
- /* harmony export */ });
886
- /* unused harmony export ActiveBoxGrid */
887
- /* harmony import */ var _ActiveBoxBag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(427);
888
- /* harmony import */ var _ActiveBox_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1725);
889
- /* harmony import */ var _AWT_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7912);
890
- /* harmony import */ var _Utils_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1253);
891
- /**
892
- * File : boxes/ActiveBoxGrid.js
893
- * Created : 19/05/2015
894
- * By : Francesc Busquets <francesc@gmail.com>
895
- *
896
- * JClic.js
897
- * An HTML5 player of JClic activities
898
- * https://projectestac.github.io/jclic.js
899
- *
900
- * @source https://github.com/projectestac/jclic.js
901
- *
902
- * @license EUPL-1.2
903
- * @licstart
904
- * (c) 2000-2020 Catalan Educational Telematic Network (XTEC)
905
- *
906
- * Licensed under the EUPL, Version 1.1 or -as soon they will be approved by
907
- * the European Commission- subsequent versions of the EUPL (the "Licence");
908
- * You may not use this work except in compliance with the Licence.
909
- *
910
- * You may obtain a copy of the Licence at:
911
- * https://joinup.ec.europa.eu/software/page/eupl
912
- *
913
- * Unless required by applicable law or agreed to in writing, software
914
- * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT
915
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
916
- * Licence for the specific language governing permissions and limitations
917
- * under the Licence.
918
- * @licend
919
- * @module
920
- */
921
-
922
-
923
-
924
-
925
-
926
-
927
- /**
928
- * This class extends {@link module:boxes/ActiveBoxbag.ActiveBoxBag ActiveBoxBag} with constructors that take an argument of type
929
- * {@link module:shapers/Shaper.Shaper Shaper} used to build all its {@link module:boxes/ActiveBox.ActiveBox ActiveBox}components. It also maintains information
930
- * about the number of "rows" and "columns", useful to compute valid (integer) values when
931
- * resizing or moving its components.
932
- * @extends module:boxes/ActiveBoxBag.ActiveBoxBag
933
- */
934
- class ActiveBoxGrid extends _ActiveBoxBag_js__WEBPACK_IMPORTED_MODULE_0__["default"] {
935
- /**
936
- * ActiveBxGrid constructor
937
- * @param {module:boxes/AbstractBox.AbstractBox} parent - The AbstractBox to which this box grid belongs
938
- * @param {module:AWT.Container} container - The container where this box grid is placed.
939
- * @param {module:boxes/BoxBase} boxBase - The object where colors, fonts, border and other graphic properties
940
- * @param {number} px - `X` coordinate of the upper left corner of this box grid
941
- * @param {number} py - `Y` coordinate of the upper left corner of this box grid
942
- * @param {number} setWidth - Total width of the box grid
943
- * @param {number} setHeight - Total height of the box grid
944
- * @param {module:shapers/Shaper.Shaper} sh - Shaper used to build the ActiveBox objects
945
- */
946
- constructor(parent, container, boxBase, px, py, setWidth, setHeight, sh) {
947
- // ActiveBoxGrid derives from ActiveBoxBag
948
- super(parent, container, boxBase);
949
-
950
- this.nCols = sh.nCols;
951
- this.nRows = sh.nRows;
952
-
953
- // This will be the enclosing rectangle of this ActiveBox bag
954
- const r = new _AWT_js__WEBPACK_IMPORTED_MODULE_2__/* .Rectangle */ .M_(
955
- new _AWT_js__WEBPACK_IMPORTED_MODULE_2__/* .Point */ .bR(px, py),
956
- new _AWT_js__WEBPACK_IMPORTED_MODULE_2__/* .Dimension */ .fg(
957
- Math.round(setWidth / this.nCols) * this.nCols,
958
- Math.round(setHeight / this.nRows) * this.nRows));
959
-
960
- // Create all the [ActiveBox](ActiveBox.html) objects based on the
961
- // shapes provided by the [Shaper](Shaper.html)
962
- for (let i = 0; i < sh.nCells; i++) {
963
- const
964
- tmpSh = sh.getShape(i, r),
965
- bx = new _ActiveBox_js__WEBPACK_IMPORTED_MODULE_1__["default"](this, container, boxBase, i, tmpSh.getBounds());
966
- if (!sh.rectangularShapes)
967
- bx.setShape(tmpSh);
968
- this.addActiveBox(bx);
969
- }
970
-
971
- // If the Shaper has `remainder` (extra space), set the background box of this
972
- // [BoxBag](BoxBag.html)
973
- if (sh.hasRemainder) {
974
- const
975
- tmpSh = sh.getRemainderShape(r),
976
- bx = new _ActiveBox_js__WEBPACK_IMPORTED_MODULE_1__["default"](this, container, boxBase, 0, tmpSh.getBounds());
977
- bx.setShape(tmpSh);
978
- this.setBackgroundBox(bx);
979
- }
980
- }
981
-
982
- /**
983
- * This factory constructor creates a new empty grid with the number of cells indicated by the
984
- * {@link module:boxes/ActiveBagContent.ActiveBagContent ActiveBagContent} `abc`, not filling the cells with any content.
985
- * @param {module:boxes/AbstractBox.AbstractBox} parent - The AbstractBox to which this box grid belongs
986
- * @param {module:AWT.Container} container - The container where this box grid is placed.
987
- * @param {number} px - `X` coordinate of the upper left corner of this box grid
988
- * @param {number} py - `Y` coordinate of the upper left corner of this box grid
989
- * @param {module:boxes/ActiveBagContent.ActiveBagContent} abc - Used only to get the number of cells and the shaper (when `sh` is `null`)
990
- * @param {module:shapers/Shaper.Shaper} sh - Shaper used to build the ActiveBox objects
991
- * @param {module:boxes/BoxBase.BoxBase} boxBase - The object where colors, fonts, border and other graphic properties
992
- * of this box grid are defined.
993
- * @returns {module:boxes/ActiveBoxGrid.ActiveBoxGrid}
994
- */
995
- static createEmptyGrid(parent, container, px, py, abc, sh, boxBase) {
996
- const result = abc ? new ActiveBoxGrid(parent, container,
997
- boxBase || abc.style,
998
- px, py,
999
- abc.getTotalWidth(), abc.getTotalHeight(),
1000
- sh || abc.getShaper()) : null;
1001
-
1002
- if (result)
1003
- result.setBorder(abc.border);
1004
-
1005
- return result;
1006
- }
1007
-
1008
- /**
1009
- * Gets the minimum size of this grid
1010
- * @returns {module:AWT.Dimension}
1011
- */
1012
- getMinimumSize() {
1013
- return new _AWT_js__WEBPACK_IMPORTED_MODULE_2__/* .Dimension */ .fg(
1014
- _Utils_js__WEBPACK_IMPORTED_MODULE_3__/* .settings */ .W0.MIN_CELL_SIZE * this.nCols,
1015
- _Utils_js__WEBPACK_IMPORTED_MODULE_3__/* .settings */ .W0.MIN_CELL_SIZE * this.nRows);
1016
- }
1017
-
1018
- /**
1019
- * Gets a scaled size of this grid, rounded to the nearest integer values
1020
- * @param {number} scale - The scale factor
1021
- * @returns {module:AWT.Dimension}
1022
- */
1023
- getScaledSize(scale) {
1024
- return new _AWT_js__WEBPACK_IMPORTED_MODULE_2__/* .Dimension */ .fg(
1025
- (0,_Utils_js__WEBPACK_IMPORTED_MODULE_3__/* .roundTo */ .GB)(scale * this.preferredBounds.dim.width, this.nCols),
1026
- (0,_Utils_js__WEBPACK_IMPORTED_MODULE_3__/* .roundTo */ .GB)(scale * this.preferredBounds.dim.height, this.nRows));
1027
- }
1028
-
1029
- /**
1030
- * Returns the logical coordinates of the provided {@link module:boxes/ActiveBox.ActiveBox ActiveBox}.
1031
- * The units of the result are not pixels, but ordinal numbers (relative positions) of columns
1032
- * and rows in the grid.
1033
- * @param {module:boxes/ActiveBox.ActiveBox} bx - The box to process
1034
- * @returns {module:AWT.Point}
1035
- */
1036
- getCoord(bx) {
1037
- return new _AWT_js__WEBPACK_IMPORTED_MODULE_2__/* .Point */ .bR(bx.idLoc % this.nCols, Math.floor(bx.idLoc / this.nCols));
1038
- }
1039
-
1040
- /**
1041
- * Calculates the logical distance between two {@link module:boxes/ActiveBox.ActiveBox ActiveBox} objects.
1042
- * Resulting units are not pixels, but ordinal numbers (relative positions) of columns and rows
1043
- * in the grid.
1044
- * @param {module:boxes/ActiveBox.ActiveBox} src - First box
1045
- * @param {module:boxes/ActiveBox.ActiveBox} dest - Second box
1046
- * @returns {module:AWT.Point}
1047
- */
1048
- getCoordDist(src, dest) {
1049
- const
1050
- ptSrc = this.getCoord(src),
1051
- ptDest = this.getCoord(dest);
1052
- return new _AWT_js__WEBPACK_IMPORTED_MODULE_2__/* .Point */ .bR(ptDest.x - ptSrc.x, ptDest.y - ptSrc.y);
1053
- }
1054
- }
1055
-
1056
- Object.assign(ActiveBoxGrid.prototype, {
1057
- /**
1058
- * Number of columns of this box grid
1059
- * @name module:boxes/ActiveBoxGrid.ActiveBoxGrid#nCols
1060
- * @type {number} */
1061
- nCols: 1,
1062
- /**
1063
- * Number of rows of this box grid
1064
- * @name module:boxes/ActiveBoxGrid.ActiveBoxGrid#nRows
1065
- * @type {number} */
1066
- nRows: 1,
1067
- });
1068
-
1069
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ActiveBoxGrid);
1070
-
1071
-
1072
- /***/ }),
1073
-
1074
- /***/ 6148:
1075
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1076
-
1077
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1078
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1079
- /* harmony export */ });
1080
- /* unused harmony export BoxConnector */
1081
- /* harmony import */ var _AWT_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7912);
1082
- /**
1083
- * File : boxes/BoxConnector.js
1084
- * Created : 26/05/2015
1085
- * By : Francesc Busquets <francesc@gmail.com>
1086
- *
1087
- * JClic.js
1088
- * An HTML5 player of JClic activities
1089
- * https://projectestac.github.io/jclic.js
1090
- *
1091
- * @source https://github.com/projectestac/jclic.js
1092
- *
1093
- * @license EUPL-1.2
1094
- * @licstart
1095
- * (c) 2000-2020 Catalan Educational Telematic Network (XTEC)
1096
- *
1097
- * Licensed under the EUPL, Version 1.1 or -as soon they will be approved by
1098
- * the European Commission- subsequent versions of the EUPL (the "Licence");
1099
- * You may not use this work except in compliance with the Licence.
1100
- *
1101
- * You may obtain a copy of the Licence at:
1102
- * https://joinup.ec.europa.eu/software/page/eupl
1103
- *
1104
- * Unless required by applicable law or agreed to in writing, software
1105
- * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT
1106
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
1107
- * Licence for the specific language governing permissions and limitations
1108
- * under the Licence.
1109
- * @licend
1110
- * @module
1111
- */
1112
-
1113
-
1114
-
1115
- const DEFAULT_COMPOSITE_OP = 'source-over';
1116
-
1117
- /**
1118
- * BoxConnector allows users to visually connect two {@link module:boxes/ActiveBox.ActiveBox ActiveBox} objects of an
1119
- * {@link module:Activity.ActivityPanel ActivityPanel}. There are two modes of operation:
1120
- *
1121
- * - Drawing a line between an origin point (usually the point where the user clicks on) and a
1122
- * destination point.
1123
- * - Dragging the ActiveBox from one location to another.
1124
- *
1125
- * The connecting lines can have arrowheads at its endings.
1126
- */
1127
- class BoxConnector {
1128
- /**
1129
- * BoxConnector constructor
1130
- * @param {module:AWT.Container} parent - The Container to which this BoxConnector belongs
1131
- * @param {external:jQuery} $canvas - The HTML `canvas` element where this BoxConnector will draw.
1132
- */
1133
- constructor(parent, $canvas) {
1134
- this.parent = parent;
1135
- this.ctx = $canvas.get(-1).getContext('2d', { willReadFrequently: true });
1136
- this.dim = new _AWT_js__WEBPACK_IMPORTED_MODULE_0__/* .Dimension */ .fg(this.ctx.canvas.width, this.ctx.canvas.height);
1137
- this.origin = new _AWT_js__WEBPACK_IMPORTED_MODULE_0__/* .Point */ .bR();
1138
- this.dest = new _AWT_js__WEBPACK_IMPORTED_MODULE_0__/* .Point */ .bR();
1139
- this.relativePos = new _AWT_js__WEBPACK_IMPORTED_MODULE_0__/* .Point */ .bR();
1140
- }
1141
-
1142
- /**
1143
- * Displaces the ending point of the connector
1144
- * @param {number} dx - Displacement on the X axis
1145
- * @param {number} dy - Displacement on the Y axis
1146
- */
1147
- moveBy(dx, dy) {
1148
- this.moveTo((0,_AWT_js__WEBPACK_IMPORTED_MODULE_0__/* .Point */ .bR)(this.dest.x + dx, this.dest.y + dy));
1149
- }
1150
-
1151
- /**
1152
- * Moves the ending point of the connector to a new position
1153
- * @param {module:AWT.Point} pt - The new position
1154
- * @param {boolean} forcePaint - When `true`, forces the repaint of all the area also if there is
1155
- * no movement at all.
1156
- */
1157
- moveTo(pt, forcePaint) {
1158
- if (!this.active || !forcePaint && this.dest.equals(pt))
1159
- return;
1160
-
1161
- // Restore the background
1162
- if (this.bgRect) {
1163
- if (this.bgImg) {
1164
- this.ctx.putImageData(
1165
- this.bgImg,
1166
- 0, 0,
1167
- this.bgRect.pos.x, this.bgRect.pos.y,
1168
- this.bgRect.dim.width, this.bgRect.dim.height);
1169
- } else if (this.parent)
1170
- this.parent.updateContent();
1171
- }
1172
-
1173
- this.dest.moveTo(pt);
1174
-
1175
- // Calculate the bounds of the invalidated area after the move:
1176
- // Start with the origin point or box area
1177
- const pt1 = new _AWT_js__WEBPACK_IMPORTED_MODULE_0__/* .Point */ .bR(this.origin.x - this.relativePos.x, this.origin.y - this.relativePos.y);
1178
- this.bgRect = new _AWT_js__WEBPACK_IMPORTED_MODULE_0__/* .Rectangle */ .M_(pt1, this.bx ? this.bx.dim : new _AWT_js__WEBPACK_IMPORTED_MODULE_0__/* .Dimension */ .fg());
1179
- // Add the destination point or box area
1180
- const pt2 = new _AWT_js__WEBPACK_IMPORTED_MODULE_0__/* .Point */ .bR(pt.x - this.relativePos.x, pt.y - this.relativePos.y);
1181
- this.bgRect.add(new _AWT_js__WEBPACK_IMPORTED_MODULE_0__/* .Rectangle */ .M_(pt2, this.bx ? this.bx.dim : new _AWT_js__WEBPACK_IMPORTED_MODULE_0__/* .Dimension */ .fg()));
1182
- // Add a generous border around the area
1183
- this.bgRect.grow(10, 10);
1184
-
1185
- if (this.bx !== null) {
1186
- // Move the ActiveBox
1187
- this.bx.moveTo(new _AWT_js__WEBPACK_IMPORTED_MODULE_0__/* .Point */ .bR(pt.x - this.relativePos.x, pt.y - this.relativePos.y));
1188
- this.bx.setTemporaryHidden(false);
1189
- this.bx.update(this.ctx, null);
1190
- this.bx.setTemporaryHidden(true);
1191
- } else {
1192
- // Draw the connecting line
1193
- this.drawLine();
1194
- this.linePainted = true;
1195
- }
1196
- }
1197
-
1198
- /**
1199
- * Starts the box connector operation
1200
- * @param {module:AWT.Point} pt - Starting point
1201
- * @param {module:boxes/ActiveBox.ActiveBox} [box] - Passed only when the BoxConnector runs in drag&drop mode
1202
- */
1203
- begin(pt, box) {
1204
- if (this.active)
1205
- this.end();
1206
- this.origin.moveTo(pt);
1207
- this.dest.moveTo(pt);
1208
- this.linePainted = false;
1209
- this.active = true;
1210
-
1211
- if (box) {
1212
- // Remember what box will be moved, hide it from the panel and repaint all
1213
- this.bx = box;
1214
- this.relativePos.moveTo(pt.x - box.pos.x, pt.y - box.pos.y);
1215
- this.bx.setFocused(true);
1216
- this.bx.setTemporaryHidden(true);
1217
- this.linePainted = false;
1218
- this.parent.invalidate().update();
1219
- }
1220
-
1221
- // Save the full image currently displayed on the panel (with the box hidden)
1222
- try {
1223
- this.bgImg = this.ctx.getImageData(0, 0, this.dim.width, this.dim.height);
1224
- } catch (_ex) {
1225
- // Avoid "canvas tainted by cross-origin data" errors
1226
- // Setting bgImg to null is less efficient, but works
1227
- this.bgImg = null;
1228
- }
1229
- this.bgRect = null;
1230
-
1231
- // Make a first movement to make the box appear
1232
- if (box)
1233
- this.moveTo(pt, true);
1234
- }
1235
-
1236
- /**
1237
- * Finalizes the operation of this box connector until a new call to `begin`
1238
- */
1239
- end() {
1240
- if (!this.active)
1241
- return;
1242
-
1243
- this.active = false;
1244
- this.linePainted = false;
1245
- this.bgRect = null;
1246
- this.bgImg = null;
1247
-
1248
- if (this.bx) {
1249
- // Restore the original position and attributes of the box
1250
- this.bx.setFocused(false);
1251
- this.bx.moveTo(this.origin.x - this.relativePos.x, this.origin.y - this.relativePos.y);
1252
- this.bx.setTemporaryHidden(false);
1253
- this.bx = null;
1254
- this.relativePos.moveTo(0, 0);
1255
- }
1256
-
1257
- // Repaint all
1258
- this.ctx.clearRect(0, 0, this.dim.width, this.dim.height);
1259
- this.parent.invalidate().update();
1260
- }
1261
-
1262
- /**
1263
- * Strokes a line between `origin` and `dest`, optionally ended with an arrowhead.
1264
- */
1265
- drawLine() {
1266
- if (this.compositeOp !== DEFAULT_COMPOSITE_OP) {
1267
- this.ctx.strokeStyle = this.xorColor;
1268
- this.ctx.globalCompositeOperation = this.compositeOp;
1269
- } else
1270
- this.ctx.strokeStyle = this.lineColor;
1271
-
1272
- this.ctx.lineWidth = this.lineWidth;
1273
-
1274
- this.ctx.beginPath();
1275
- this.ctx.moveTo(this.origin.x, this.origin.y);
1276
- this.ctx.lineTo(this.dest.x, this.dest.y);
1277
- this.ctx.stroke();
1278
-
1279
- if (this.arrow) {
1280
- // Draws the arrow head
1281
- const
1282
- beta = Math.atan2(this.origin.x - this.dest.x, this.dest.x - this.origin.x),
1283
- arp = new _AWT_js__WEBPACK_IMPORTED_MODULE_0__/* .Point */ .bR(this.dest.x - this.arrowLength * Math.cos(beta + this.arrowAngle),
1284
- this.dest.y + this.arrowLength * Math.sin(beta + this.arrowAngle));
1285
- this.ctx.beginPath();
1286
- this.ctx.moveTo(this.dest.x, this.dest.y);
1287
- this.ctx.lineTo(arp.x, arp.y);
1288
- this.ctx.stroke();
1289
-
1290
- arp.moveTo(this.dest.x - this.arrowLength * Math.cos(beta - this.arrowAngle),
1291
- this.dest.y + this.arrowLength * Math.sin(beta - this.arrowAngle));
1292
- this.ctx.beginPath();
1293
- this.ctx.moveTo(this.dest.x, this.dest.y);
1294
- this.ctx.lineTo(arp.x, arp.y);
1295
- this.ctx.stroke();
1296
- }
1297
- if (this.compositeOp !== DEFAULT_COMPOSITE_OP) {
1298
- // reset default settings
1299
- this.ctx.globalCompositeOperation = DEFAULT_COMPOSITE_OP;
1300
- }
1301
- }
1302
- }
1303
-
1304
- Object.assign(BoxConnector.prototype, {
1305
- /**
1306
- * The background image, saved and redrawn on each movement
1307
- * @name module:boxes/BoxConnector.BoxConnector#bgImg
1308
- * @type {external:HTMLImageElement} */
1309
- bgImg: null,
1310
- /**
1311
- * The rectangle of {@link module:Activity.ActivityPanel ActivityPanel} saved in `bgImg`
1312
- * @name module:boxes/BoxConnector.BoxConnector#bgRect
1313
- * @type {module:AWT.Rectangle} */
1314
- bgRect: null,
1315
- /**
1316
- * Initial position of the connector
1317
- * @name module:boxes/BoxConnector.BoxConnector#origin
1318
- * @type {module:AWT.Point} */
1319
- origin: null,
1320
- /**
1321
- * Current (while moving) and final position of the connector
1322
- * @name module:boxes/BoxConnector.BoxConnector#dest
1323
- * @type {module:AWT.Point} */
1324
- dest: null,
1325
- /**
1326
- * When `true`, the connector must end on arrowhead
1327
- * @name module:boxes/BoxConnector.BoxConnector#arrow
1328
- * @type {boolean} */
1329
- arrow: false,
1330
- /**
1331
- * `true` while the connector is active
1332
- * @name module:boxes/BoxConnector.BoxConnector#active
1333
- * @type {boolean} */
1334
- active: false,
1335
- /**
1336
- * `true` while the line has already been painted (used for XOR expressions)
1337
- * @name module:boxes/BoxConnector.BoxConnector#linePainted
1338
- * @type {boolean} */
1339
- linePainted: false,
1340
- /**
1341
- * The arrowhead length (in pixels)
1342
- * @name module:boxes/BoxConnector.BoxConnector#arrowLength
1343
- * @type {number} */
1344
- arrowLength: 10,
1345
- /**
1346
- * The arrowhead angle
1347
- * @name module:boxes/BoxConnector.BoxConnector#arrowAngle
1348
- * @type {number} */
1349
- arrowAngle: Math.PI / 6,
1350
- /**
1351
- * The main color used in XOR operations
1352
- * @name module:boxes/BoxConnector.BoxConnector#lineColor
1353
- * @type {string} */
1354
- lineColor: 'black',
1355
- /**
1356
- * The complementary color used in XOR operations
1357
- * @name module:boxes/BoxConnector.BoxConnector#xorColor
1358
- * @type {string} */
1359
- xorColor: 'white',
1360
- /**
1361
- * The global composite operator used when drawing in XOR mode. Default is "difference".
1362
- * For a list of possible values see:
1363
- * {@link https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation}
1364
- * @name module:boxes/BoxConnector.BoxConnector#compositeOp
1365
- * @type {string} */
1366
- compositeOp: 'difference',
1367
- /**
1368
- * The default {@link https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation composite operator}
1369
- * ("source-over").
1370
- * @name module:boxes/BoxConnector.BoxConnector#DEFAULT_COMPOSITE_OP
1371
- * @static
1372
- * @type {string} */
1373
- DEFAULT_COMPOSITE_OP: DEFAULT_COMPOSITE_OP,
1374
- /**
1375
- * Relative position of point B regarding A
1376
- * @name module:boxes/BoxConnector.BoxConnector#relativePos
1377
- * @type {module:AWT.Point} */
1378
- relativePos: null,
1379
- /**
1380
- * The ActiveBox to connect or move
1381
- * @name module:boxes/BoxConnector.BoxConnector#bx
1382
- * @type {module:boxes/ActiveBox.ActiveBox} */
1383
- bx: null,
1384
- /**
1385
- * The Graphics context where the BoxConnector will paint
1386
- * @name module:boxes/BoxConnector.BoxConnector#ctx
1387
- * @type {external:CanvasRenderingContext2D} */
1388
- ctx: null,
1389
- /**
1390
- * The dimension of the HTML canvas where to draw
1391
- * @name module:boxes/BoxConnector.BoxConnector#dim
1392
- * @type {module:AWT.Dimension} */
1393
- dim: null,
1394
- /**
1395
- * The container to which this connector belongs
1396
- * @name module:boxes/BoxConnector.BoxConnector#parent
1397
- * @type {module:AWT.Container} */
1398
- parent: null,
1399
- /**
1400
- * Width of the connector line
1401
- * @name module:boxes/BoxConnector.BoxConnector#lineWidth
1402
- * @type {number} */
1403
- lineWidth: 1.5,
1404
- });
1405
-
1406
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BoxConnector);
1407
-
1408
-
1409
- /***/ })
1410
-
1411
- };
1412
- ;
1413
- //# sourceMappingURL=6454.jclic-node.js.map