jclic 2.1.21 → 2.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/jclic-node.js +9 -8
- package/dist/jclic-node.js.map +1 -1
- package/dist/jclic.min.js +2 -2
- package/dist/jclic.min.js.map +1 -1
- package/package.json +4 -4
- package/src/GlobalData.js +1 -1
- package/src/JClicPlayer.js +2 -2
- package/src/bags/MediaBag.js +6 -5
- package/dist/1078.jclic-node.js +0 -282
- package/dist/1078.jclic-node.js.map +0 -1
- package/dist/1196.jclic-node.js +0 -808
- package/dist/1196.jclic-node.js.map +0 -1
- package/dist/1253.jclic-node.js +0 -1432
- package/dist/1253.jclic-node.js.map +0 -1
- package/dist/13.jclic-node.js +0 -103
- package/dist/13.jclic-node.js.map +0 -1
- package/dist/1567.jclic-node.js +0 -2313
- package/dist/1567.jclic-node.js.map +0 -1
- package/dist/1588.jclic-node.js +0 -602
- package/dist/1588.jclic-node.js.map +0 -1
- package/dist/1725.jclic-node.js +0 -836
- package/dist/1725.jclic-node.js.map +0 -1
- package/dist/1731.jclic-node.js +0 -438
- package/dist/1731.jclic-node.js.map +0 -1
- package/dist/1842.jclic-node.js +0 -651
- package/dist/1842.jclic-node.js.map +0 -1
- package/dist/2160.jclic-node.js +0 -1016
- package/dist/2160.jclic-node.js.map +0 -1
- package/dist/222.jclic-node.js +0 -129
- package/dist/222.jclic-node.js.map +0 -1
- package/dist/2316.jclic-node.js +0 -949
- package/dist/2316.jclic-node.js.map +0 -1
- package/dist/2355.jclic-node.js +0 -371
- package/dist/2355.jclic-node.js.map +0 -1
- package/dist/2366.jclic-node.js +0 -431
- package/dist/2366.jclic-node.js.map +0 -1
- package/dist/2379.jclic-node.js +0 -202
- package/dist/2379.jclic-node.js.map +0 -1
- package/dist/2437.jclic-node.js +0 -450
- package/dist/2437.jclic-node.js.map +0 -1
- package/dist/2531.jclic-node.js +0 -869
- package/dist/2531.jclic-node.js.map +0 -1
- package/dist/2608.jclic-node.js +0 -160
- package/dist/2608.jclic-node.js.map +0 -1
- package/dist/2715.jclic-node.js +0 -554
- package/dist/2715.jclic-node.js.map +0 -1
- package/dist/277.jclic-node.js +0 -22
- package/dist/277.jclic-node.js.map +0 -1
- package/dist/2921.jclic-node.js +0 -660
- package/dist/2921.jclic-node.js.map +0 -1
- package/dist/2952.jclic-node.js +0 -101
- package/dist/2952.jclic-node.js.map +0 -1
- package/dist/3018.jclic-node.js +0 -421
- package/dist/3018.jclic-node.js.map +0 -1
- package/dist/3019.jclic-node.js +0 -682
- package/dist/3019.jclic-node.js.map +0 -1
- package/dist/3231.jclic-node.js +0 -274
- package/dist/3231.jclic-node.js.map +0 -1
- package/dist/331.jclic-node.js +0 -115
- package/dist/331.jclic-node.js.map +0 -1
- package/dist/3391.jclic-node.js +0 -276
- package/dist/3391.jclic-node.js.map +0 -1
- package/dist/3502.jclic-node.js +0 -671
- package/dist/3502.jclic-node.js.map +0 -1
- package/dist/3653.jclic-node.js +0 -982
- package/dist/3653.jclic-node.js.map +0 -1
- package/dist/371.jclic.min.js +0 -2
- package/dist/371.jclic.min.js.map +0 -1
- package/dist/3856.jclic-node.js +0 -575
- package/dist/3856.jclic-node.js.map +0 -1
- package/dist/4112.jclic-node.js +0 -659
- package/dist/4112.jclic-node.js.map +0 -1
- package/dist/4123.jclic-node.js +0 -910
- package/dist/4123.jclic-node.js.map +0 -1
- package/dist/427.jclic-node.js +0 -894
- package/dist/427.jclic-node.js.map +0 -1
- package/dist/4483.jclic-node.js +0 -327
- package/dist/4483.jclic-node.js.map +0 -1
- package/dist/4548.jclic-node.js +0 -1078
- package/dist/4548.jclic-node.js.map +0 -1
- package/dist/466.jclic-node.js +0 -99
- package/dist/466.jclic-node.js.map +0 -1
- package/dist/485.jclic-node.js +0 -783
- package/dist/485.jclic-node.js.map +0 -1
- package/dist/4921.jclic-node.js +0 -500
- package/dist/4921.jclic-node.js.map +0 -1
- package/dist/5091.jclic-node.js +0 -239
- package/dist/5091.jclic-node.js.map +0 -1
- package/dist/520.jclic-node.js +0 -550
- package/dist/520.jclic-node.js.map +0 -1
- package/dist/5312.jclic-node.js +0 -1126
- package/dist/5312.jclic-node.js.map +0 -1
- package/dist/5338.jclic-node.js +0 -212
- package/dist/5338.jclic-node.js.map +0 -1
- package/dist/5344.jclic-node.js +0 -229
- package/dist/5344.jclic-node.js.map +0 -1
- package/dist/5550.jclic-node.js +0 -238
- package/dist/5550.jclic-node.js.map +0 -1
- package/dist/5626.jclic-node.js +0 -614
- package/dist/5626.jclic-node.js.map +0 -1
- package/dist/5977.jclic-node.js +0 -1081
- package/dist/5977.jclic-node.js.map +0 -1
- package/dist/6148.jclic-node.js +0 -345
- package/dist/6148.jclic-node.js.map +0 -1
- package/dist/6176.jclic-node.js +0 -481
- package/dist/6176.jclic-node.js.map +0 -1
- package/dist/6221.jclic-node.js +0 -1072
- package/dist/6221.jclic-node.js.map +0 -1
- package/dist/6238.jclic-node.js +0 -718
- package/dist/6238.jclic-node.js.map +0 -1
- package/dist/6454.jclic-node.js +0 -1413
- package/dist/6454.jclic-node.js.map +0 -1
- package/dist/6565.jclic-node.js +0 -294
- package/dist/6565.jclic-node.js.map +0 -1
- package/dist/6579.jclic-node.js +0 -719
- package/dist/6579.jclic-node.js.map +0 -1
- package/dist/6715.jclic-node.js +0 -148
- package/dist/6715.jclic-node.js.map +0 -1
- package/dist/6777.jclic-node.js +0 -171
- package/dist/6777.jclic-node.js.map +0 -1
- package/dist/6782.jclic-node.js +0 -1611
- package/dist/6782.jclic-node.js.map +0 -1
- package/dist/6847.jclic-node.js +0 -601
- package/dist/6847.jclic-node.js.map +0 -1
- package/dist/6856.jclic-node.js +0 -252
- package/dist/6856.jclic-node.js.map +0 -1
- package/dist/696.jclic-node.js +0 -1821
- package/dist/696.jclic-node.js.map +0 -1
- package/dist/698.jclic-node.js +0 -583
- package/dist/698.jclic-node.js.map +0 -1
- package/dist/704.jclic-node.js +0 -80
- package/dist/704.jclic-node.js.map +0 -1
- package/dist/7046.jclic-node.js +0 -735
- package/dist/7046.jclic-node.js.map +0 -1
- package/dist/7220.jclic-node.js +0 -156
- package/dist/7220.jclic-node.js.map +0 -1
- package/dist/7257.jclic-node.js +0 -931
- package/dist/7257.jclic-node.js.map +0 -1
- package/dist/743.jclic-node.js +0 -583
- package/dist/743.jclic-node.js.map +0 -1
- package/dist/757.jclic-node.js +0 -1072
- package/dist/757.jclic-node.js.map +0 -1
- package/dist/7781.jclic-node.js +0 -202
- package/dist/7781.jclic-node.js.map +0 -1
- package/dist/7912.jclic-node.js +0 -2103
- package/dist/7912.jclic-node.js.map +0 -1
- package/dist/827.jclic-node.js +0 -708
- package/dist/827.jclic-node.js.map +0 -1
- package/dist/8276.jclic-node.js +0 -409
- package/dist/8276.jclic-node.js.map +0 -1
- package/dist/8322.jclic-node.js +0 -498
- package/dist/8322.jclic-node.js.map +0 -1
- package/dist/8641.jclic-node.js +0 -360
- package/dist/8641.jclic-node.js.map +0 -1
- package/dist/8837.jclic-node.js +0 -651
- package/dist/8837.jclic-node.js.map +0 -1
- package/dist/8895.jclic-node.js +0 -151
- package/dist/8895.jclic-node.js.map +0 -1
- package/dist/9072.jclic-node.js +0 -1285
- package/dist/9072.jclic-node.js.map +0 -1
- package/dist/9078.jclic-node.js +0 -935
- package/dist/9078.jclic-node.js.map +0 -1
- package/dist/9103.jclic-node.js +0 -718
- package/dist/9103.jclic-node.js.map +0 -1
- package/dist/9359.jclic-node.js +0 -145
- package/dist/9359.jclic-node.js.map +0 -1
- package/dist/9409.jclic-node.js +0 -921
- package/dist/9409.jclic-node.js.map +0 -1
- package/dist/9513.jclic-node.js +0 -720
- package/dist/9513.jclic-node.js.map +0 -1
- package/dist/9704.jclic-node.js +0 -81
- package/dist/9704.jclic-node.js.map +0 -1
- package/dist/9950.jclic-node.js +0 -827
- package/dist/9950.jclic-node.js.map +0 -1
package/dist/2921.jclic-node.js
DELETED
|
@@ -1,660 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
exports.id = 2921;
|
|
3
|
-
exports.ids = [2921,7781];
|
|
4
|
-
exports.modules = {
|
|
5
|
-
|
|
6
|
-
/***/ 2921:
|
|
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 Explore, ExplorePanel */
|
|
13
|
-
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7750);
|
|
14
|
-
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
|
|
15
|
-
/* harmony import */ var _Activity_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1567);
|
|
16
|
-
/* harmony import */ var _boxes_ActiveBoxGrid_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7781);
|
|
17
|
-
/* harmony import */ var _boxes_BoxBag_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9205);
|
|
18
|
-
/* harmony import */ var _AWT_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7912);
|
|
19
|
-
/* harmony import */ var _shapers_Rectangular_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(4921);
|
|
20
|
-
/**
|
|
21
|
-
* File : activities/panels/Explore.js
|
|
22
|
-
* Created : 04/06/2015
|
|
23
|
-
* By : Francesc Busquets <francesc@gmail.com>
|
|
24
|
-
*
|
|
25
|
-
* JClic.js
|
|
26
|
-
* An HTML5 player of JClic activities
|
|
27
|
-
* https://projectestac.github.io/jclic.js
|
|
28
|
-
*
|
|
29
|
-
* @source https://github.com/projectestac/jclic.js
|
|
30
|
-
*
|
|
31
|
-
* @license EUPL-1.2
|
|
32
|
-
* @licstart
|
|
33
|
-
* (c) 2000-2020 Educational Telematic Network of Catalonia (XTEC)
|
|
34
|
-
*
|
|
35
|
-
* Licensed under the EUPL, Version 1.1 or -as soon they will be approved by
|
|
36
|
-
* the European Commission- subsequent versions of the EUPL (the "Licence");
|
|
37
|
-
* You may not use this work except in compliance with the Licence.
|
|
38
|
-
*
|
|
39
|
-
* You may obtain a copy of the Licence at:
|
|
40
|
-
* https://joinup.ec.europa.eu/software/page/eupl
|
|
41
|
-
*
|
|
42
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
43
|
-
* distributed under the Licence is distributed on an "AS IS" basis, WITHOUT
|
|
44
|
-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
45
|
-
* Licence for the specific language governing permissions and limitations
|
|
46
|
-
* under the Licence.
|
|
47
|
-
* @licend
|
|
48
|
-
* @module
|
|
49
|
-
*/
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* This class of {@link module:Activity.Activity Activity} shows a panel with {@link module:boxes/ActiveBox.ActiveBox ActiveBox} objects. Users can click
|
|
60
|
-
* on this objects to obtain associated information. This associated information, displayed in
|
|
61
|
-
* a second panel, can be text graphics, sound, video... or a combination of them.
|
|
62
|
-
* @extends module:Activity.Activity
|
|
63
|
-
*/
|
|
64
|
-
class Explore extends _Activity_js__WEBPACK_IMPORTED_MODULE_1__/* .Activity */ .I {
|
|
65
|
-
/**
|
|
66
|
-
* Explore constructor
|
|
67
|
-
* @param {module:project/JClicProject.JClicProject} project - The {@link module:project/JClicProject.JClicProject JClicProject} to which this activity belongs
|
|
68
|
-
*/
|
|
69
|
-
constructor(project) {
|
|
70
|
-
super(project);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Activities of this type never end, so automatic sequences must pause here
|
|
75
|
-
* @override
|
|
76
|
-
* @returns {boolean}
|
|
77
|
-
*/
|
|
78
|
-
mustPauseSequence() {
|
|
79
|
-
return true;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Retrieves the minimum number of actions needed to solve this activity
|
|
84
|
-
* @override
|
|
85
|
-
* @returns {number}
|
|
86
|
-
*/
|
|
87
|
-
getMinNumActions() {
|
|
88
|
-
return 0;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Usually this activity don't use random to shuffle internal components, but in some cases
|
|
93
|
-
* can make use of it.
|
|
94
|
-
* @override
|
|
95
|
-
* @returns {boolean}
|
|
96
|
-
*/
|
|
97
|
-
hasRandom() {
|
|
98
|
-
return true;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* The {@link module:Activity.ActivityPanel ActivityPanel} where {@link module:activities/panels/Explore.Explore Explore} activities are played.
|
|
104
|
-
* @extends module:Activity.ActivityPanel
|
|
105
|
-
*/
|
|
106
|
-
class ExplorePanel extends _Activity_js__WEBPACK_IMPORTED_MODULE_1__/* .ActivityPanel */ .S {
|
|
107
|
-
/**
|
|
108
|
-
* ExplorePanel constructor
|
|
109
|
-
* @param {module:Activity.Activity} act - The {@link module:Activity.Activity Activity} to which this Panel belongs
|
|
110
|
-
* @param {module:JClicPlayer.JClicPlayer} ps - Any object implementing the methods defined in the
|
|
111
|
-
* [PlayStation](http://projectestac.github.io/jclic/apidoc/edu/xtec/jclic/PlayStation.html) Java interface.
|
|
112
|
-
* @param {external:jQuery} [$div] - The jQuery DOM element where this Panel will deploy
|
|
113
|
-
*/
|
|
114
|
-
constructor(act, ps, $div) {
|
|
115
|
-
super(act, ps, $div);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* Miscellaneous cleaning operations
|
|
120
|
-
* @override
|
|
121
|
-
*/
|
|
122
|
-
clear() {
|
|
123
|
-
if (this.bgA) {
|
|
124
|
-
this.bgA.end();
|
|
125
|
-
this.bgA = null;
|
|
126
|
-
}
|
|
127
|
-
if (this.bgB) {
|
|
128
|
-
this.bgB.end();
|
|
129
|
-
this.bgB = null;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* Prepares the visual components of the activity
|
|
135
|
-
* @override
|
|
136
|
-
*/
|
|
137
|
-
buildVisualComponents() {
|
|
138
|
-
if (this.firstRun)
|
|
139
|
-
super.buildVisualComponents();
|
|
140
|
-
this.clear();
|
|
141
|
-
const
|
|
142
|
-
abcA = this.act.abc['primary'],
|
|
143
|
-
abcB = this.act.abc['secondary'];
|
|
144
|
-
|
|
145
|
-
if (abcA && abcB) {
|
|
146
|
-
if (abcA.image) {
|
|
147
|
-
abcA.setImgContent(this.act.project.mediaBag, null, false);
|
|
148
|
-
if (abcA.animatedGifFile && !abcA.shaper.rectangularShapes && !this.act.shuffleA)
|
|
149
|
-
this.$animatedBg = jquery__WEBPACK_IMPORTED_MODULE_0___default()('<span/>').css({
|
|
150
|
-
'background-image': `url(${abcA.animatedGifFile})`,
|
|
151
|
-
'background-position': 'center',
|
|
152
|
-
'background-repeat': 'no-repeat',
|
|
153
|
-
position: 'absolute'
|
|
154
|
-
}).appendTo(this.$div);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
if (abcB.image)
|
|
158
|
-
abcB.setImgContent(this.act.project.mediaBag, null, false);
|
|
159
|
-
|
|
160
|
-
if (this.act.acp !== null)
|
|
161
|
-
this.act.acp.generateContent(abcA.nch, abcA.ncw, [abcA, abcB], false);
|
|
162
|
-
|
|
163
|
-
this.bgA = _boxes_ActiveBoxGrid_js__WEBPACK_IMPORTED_MODULE_2__["default"].createEmptyGrid(null, this, this.act.margin, this.act.margin, abcA);
|
|
164
|
-
const w = (this.act.boxGridPos === 'AUB' || this.act.boxGridPos === 'BUA') ? abcA.getTotalWidth() : abcB.w;
|
|
165
|
-
this.bgB = new _boxes_ActiveBoxGrid_js__WEBPACK_IMPORTED_MODULE_2__["default"](null, this, abcB.style, this.act.margin, this.act.margin, w, abcB.h, new _shapers_Rectangular_js__WEBPACK_IMPORTED_MODULE_5__["default"](1, 1));
|
|
166
|
-
|
|
167
|
-
this.bgA.setContent(abcA);
|
|
168
|
-
this.bgA.setDefaultIdAss();
|
|
169
|
-
if (this.$animatedBg)
|
|
170
|
-
this.bgA.setCellAttr('tmpTrans', true);
|
|
171
|
-
this.bgB.getActiveBox(0).setInactive(false);
|
|
172
|
-
this.bgA.setVisible(true);
|
|
173
|
-
this.bgB.setVisible(true);
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
/**
|
|
178
|
-
* Basic initialization procedure
|
|
179
|
-
* @override
|
|
180
|
-
*/
|
|
181
|
-
initActivity() {
|
|
182
|
-
super.initActivity();
|
|
183
|
-
if (!this.firstRun)
|
|
184
|
-
this.buildVisualComponents();
|
|
185
|
-
else
|
|
186
|
-
this.firstRun = false;
|
|
187
|
-
|
|
188
|
-
if (this.bgA && this.bgB) {
|
|
189
|
-
// Scramble cells
|
|
190
|
-
if (this.act.shuffleA)
|
|
191
|
-
this.shuffle([this.bgA], true, true);
|
|
192
|
-
|
|
193
|
-
if (this.useOrder)
|
|
194
|
-
this.currentItem = this.bgA.getNextItem(-1);
|
|
195
|
-
|
|
196
|
-
this.setAndPlayMsg('initial', 'start');
|
|
197
|
-
this.invalidate().update();
|
|
198
|
-
this.playing = true;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* Updates the graphic content of this panel.
|
|
204
|
-
* This method will be called from {@link module:AWT.Container#update} when needed.
|
|
205
|
-
* @override
|
|
206
|
-
* @param {module:AWT.Rectangle} dirtyRegion - Specifies the area to be updated. When `null`,
|
|
207
|
-
* it's the whole panel.
|
|
208
|
-
*/
|
|
209
|
-
updateContent(dirtyRegion) {
|
|
210
|
-
super.updateContent(dirtyRegion);
|
|
211
|
-
if (this.bgA && this.bgB && this.$canvas) {
|
|
212
|
-
const
|
|
213
|
-
canvas = this.$canvas.get(-1),
|
|
214
|
-
ctx = canvas.getContext('2d');
|
|
215
|
-
if (!dirtyRegion)
|
|
216
|
-
dirtyRegion = new _AWT_js__WEBPACK_IMPORTED_MODULE_4__/* .Rectangle */ .M_(0, 0, canvas.width, canvas.height);
|
|
217
|
-
ctx.clearRect(dirtyRegion.pos.x, dirtyRegion.pos.y, dirtyRegion.dim.width, dirtyRegion.dim.height);
|
|
218
|
-
this.bgA.update(ctx, dirtyRegion);
|
|
219
|
-
this.bgB.update(ctx, dirtyRegion);
|
|
220
|
-
}
|
|
221
|
-
return this;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
/**
|
|
225
|
-
* Sets the real dimension of this panel.
|
|
226
|
-
* @override
|
|
227
|
-
* @param {module:AWT.Dimension} preferredMaxSize - The maximum surface available for the activity panel
|
|
228
|
-
* @returns {module:AWT.Dimension}
|
|
229
|
-
*/
|
|
230
|
-
setDimension(preferredMaxSize) {
|
|
231
|
-
return !this.bgA || !this.bgB || this.getBounds().equals(preferredMaxSize) ?
|
|
232
|
-
preferredMaxSize :
|
|
233
|
-
_boxes_BoxBag_js__WEBPACK_IMPORTED_MODULE_3__["default"].layoutDouble(preferredMaxSize, this.bgA, this.bgB, this.act.boxGridPos, this.act.margin);
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
/**
|
|
237
|
-
* Sets the size and position of this activity panel
|
|
238
|
-
* @override
|
|
239
|
-
* @param {module:AWT.Rectangle} rect
|
|
240
|
-
*/
|
|
241
|
-
setBounds(rect) {
|
|
242
|
-
if (this.$canvas)
|
|
243
|
-
this.$canvas.remove();
|
|
244
|
-
super.setBounds(rect);
|
|
245
|
-
|
|
246
|
-
if (this.bgA || this.bgB) {
|
|
247
|
-
// Create the main canvas
|
|
248
|
-
this.$canvas = jquery__WEBPACK_IMPORTED_MODULE_0___default()(`<canvas width="${rect.dim.width}" height="${rect.dim.height}"/>`).css({
|
|
249
|
-
position: 'absolute',
|
|
250
|
-
top: 0,
|
|
251
|
-
left: 0
|
|
252
|
-
});
|
|
253
|
-
// Resize animated gif background
|
|
254
|
-
if (this.$animatedBg) {
|
|
255
|
-
const bgRect = this.bgA.getBounds();
|
|
256
|
-
this.$animatedBg.css({
|
|
257
|
-
left: bgRect.pos.x,
|
|
258
|
-
top: bgRect.pos.y,
|
|
259
|
-
width: `${bgRect.dim.width}px`,
|
|
260
|
-
height: `${bgRect.dim.height}px`,
|
|
261
|
-
'background-size': `${bgRect.dim.width}px ${bgRect.dim.height}px`
|
|
262
|
-
});
|
|
263
|
-
}
|
|
264
|
-
this.$div.append(this.$canvas);
|
|
265
|
-
// Repaint all
|
|
266
|
-
this.invalidate().update();
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* Builds the accessible components needed for this ActivityPanel
|
|
272
|
-
* This method is called when all main elements are placed and visible, when the activity is ready
|
|
273
|
-
* to start or when resized.
|
|
274
|
-
* @override
|
|
275
|
-
*/
|
|
276
|
-
buildAccessibleComponents() {
|
|
277
|
-
if (this.$canvas && this.accessibleCanvas) {
|
|
278
|
-
super.buildAccessibleComponents();
|
|
279
|
-
if (this.bgA)
|
|
280
|
-
this.bgA.buildAccessibleElements(this.$canvas, this.$div);
|
|
281
|
-
if (this.bgB)
|
|
282
|
-
this.bgB.buildAccessibleElements(this.$canvas, this.$div);
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
/**
|
|
287
|
-
* Main handler used to process mouse, touch, keyboard and edit events
|
|
288
|
-
* @override
|
|
289
|
-
* @param {external:Event} event - The HTML event to be processed
|
|
290
|
-
* @returns {boolean} - When this event handler returns `false`, jQuery will stop its
|
|
291
|
-
* propagation through the DOM tree. See: {@link http://api.jquery.com/on}
|
|
292
|
-
*/
|
|
293
|
-
processEvent(event) {
|
|
294
|
-
if (this.playing) {
|
|
295
|
-
const p = new _AWT_js__WEBPACK_IMPORTED_MODULE_4__/* .Point */ .bR(
|
|
296
|
-
event.pageX - this.$div.offset().left,
|
|
297
|
-
event.pageY - this.$div.offset().top),
|
|
298
|
-
// Array to be filled with actions to be executed at the end of event processing
|
|
299
|
-
delayedActions = [];
|
|
300
|
-
|
|
301
|
-
switch (event.type) {
|
|
302
|
-
case 'click':
|
|
303
|
-
this.ps.stopMedia(1);
|
|
304
|
-
const bx1 = this.bgA.findActiveBox(p);
|
|
305
|
-
if (bx1) {
|
|
306
|
-
const bx2 = this.bgB.getActiveBox(0);
|
|
307
|
-
if (bx1.idAss !== -1 && (!this.act.useOrder || bx1.idOrder === this.currentItem)) {
|
|
308
|
-
bx2.setContent(this.act.abc['secondary'], bx1.idAss);
|
|
309
|
-
if (!bx2.playMedia(this.ps, delayedActions) && !bx1.playMedia(this.ps, delayedActions))
|
|
310
|
-
this.playEvent('CLICK');
|
|
311
|
-
if (this.act.useOrder)
|
|
312
|
-
this.currentItem = this.bgA.getNextItem(this.currentItem);
|
|
313
|
-
this.ps.reportNewAction(this.act, 'SELECT', bx1.getDescription(), bx2.getDescription(), true, 0);
|
|
314
|
-
// Modified May 2020: Focusing `accessibleElement` will always draw a border on bx2
|
|
315
|
-
// if (bx2.$accessibleElement)
|
|
316
|
-
// bx2.$accessibleElement.focus();
|
|
317
|
-
|
|
318
|
-
// Clic 3.0 behavior, applied only to one-cell activities:
|
|
319
|
-
if (bx1.idAss === 0 && this.bgA.getNumCells() === 1) {
|
|
320
|
-
const seq = this.act.project.activitySequence;
|
|
321
|
-
const ase = seq.getCurrentAct();
|
|
322
|
-
if (ase && seq.hasNextAct(true) && ase.delay > 0
|
|
323
|
-
&& (seq.getNavButtonsFlag() !== 'both' && seq.getNavButtonsFlag() !== 'fwd')) {
|
|
324
|
-
this.finishActivity(true);
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
} else {
|
|
329
|
-
bx2.clear();
|
|
330
|
-
bx2.setInactive(false);
|
|
331
|
-
}
|
|
332
|
-
this.update();
|
|
333
|
-
}
|
|
334
|
-
break;
|
|
335
|
-
}
|
|
336
|
-
delayedActions.forEach(action => action());
|
|
337
|
-
event.preventDefault();
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
Object.assign(ExplorePanel.prototype, {
|
|
343
|
-
/**
|
|
344
|
-
* The {@link module:boxes/ActiveBoxbag.ActiveBoxBag ActiveBoxBag} object containing the information to be displayed in the `primary` panel
|
|
345
|
-
* @name module:activities/panels/Explore.ExplorePanel#bgA
|
|
346
|
-
* @type {module:boxes/ActiveBoxBag.ActiveBoxBag} */
|
|
347
|
-
bgA: null,
|
|
348
|
-
/**
|
|
349
|
-
* The {@link module:boxes/ActiveBoxbag.ActiveBoxBag ActiveBoxBag} object containing the information associated to `primary` elements.
|
|
350
|
-
* Only one of this elements will be showed for each click done in the `primary` panel.
|
|
351
|
-
* @name module:activities/panels/Explore.ExplorePanel#bgB
|
|
352
|
-
* @type {module:boxes/ActiveBoxBag.ActiveBoxBag} */
|
|
353
|
-
bgB: null,
|
|
354
|
-
/**
|
|
355
|
-
* List of mouse, touch and keyboard events intercepted by this panel
|
|
356
|
-
* @override
|
|
357
|
-
* @name module:activities/panels/Explore.ExplorePanel#events
|
|
358
|
-
* @type {string[]} */
|
|
359
|
-
events: ['click'],
|
|
360
|
-
});
|
|
361
|
-
|
|
362
|
-
/**
|
|
363
|
-
* Panel class associated to this type of activity: {@link module:activities/panels/Explore.ExplorePanel ExplorePanel}
|
|
364
|
-
* @type {class} */
|
|
365
|
-
Explore.Panel = ExplorePanel;
|
|
366
|
-
|
|
367
|
-
// Register activity class
|
|
368
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_Activity_js__WEBPACK_IMPORTED_MODULE_1__/* .Activity */ .I.registerClass('@panels.Explore', Explore));
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
/***/ }),
|
|
372
|
-
|
|
373
|
-
/***/ 7781:
|
|
374
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
375
|
-
|
|
376
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
377
|
-
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
378
|
-
/* harmony export */ });
|
|
379
|
-
/* unused harmony export ActiveBoxGrid */
|
|
380
|
-
/* harmony import */ var _ActiveBoxBag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(427);
|
|
381
|
-
/* harmony import */ var _ActiveBox_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1725);
|
|
382
|
-
/* harmony import */ var _AWT_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7912);
|
|
383
|
-
/* harmony import */ var _Utils_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1253);
|
|
384
|
-
/**
|
|
385
|
-
* File : boxes/ActiveBoxGrid.js
|
|
386
|
-
* Created : 19/05/2015
|
|
387
|
-
* By : Francesc Busquets <francesc@gmail.com>
|
|
388
|
-
*
|
|
389
|
-
* JClic.js
|
|
390
|
-
* An HTML5 player of JClic activities
|
|
391
|
-
* https://projectestac.github.io/jclic.js
|
|
392
|
-
*
|
|
393
|
-
* @source https://github.com/projectestac/jclic.js
|
|
394
|
-
*
|
|
395
|
-
* @license EUPL-1.2
|
|
396
|
-
* @licstart
|
|
397
|
-
* (c) 2000-2020 Catalan Educational Telematic Network (XTEC)
|
|
398
|
-
*
|
|
399
|
-
* Licensed under the EUPL, Version 1.1 or -as soon they will be approved by
|
|
400
|
-
* the European Commission- subsequent versions of the EUPL (the "Licence");
|
|
401
|
-
* You may not use this work except in compliance with the Licence.
|
|
402
|
-
*
|
|
403
|
-
* You may obtain a copy of the Licence at:
|
|
404
|
-
* https://joinup.ec.europa.eu/software/page/eupl
|
|
405
|
-
*
|
|
406
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
407
|
-
* distributed under the Licence is distributed on an "AS IS" basis, WITHOUT
|
|
408
|
-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
409
|
-
* Licence for the specific language governing permissions and limitations
|
|
410
|
-
* under the Licence.
|
|
411
|
-
* @licend
|
|
412
|
-
* @module
|
|
413
|
-
*/
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
/**
|
|
421
|
-
* This class extends {@link module:boxes/ActiveBoxbag.ActiveBoxBag ActiveBoxBag} with constructors that take an argument of type
|
|
422
|
-
* {@link module:shapers/Shaper.Shaper Shaper} used to build all its {@link module:boxes/ActiveBox.ActiveBox ActiveBox}components. It also maintains information
|
|
423
|
-
* about the number of "rows" and "columns", useful to compute valid (integer) values when
|
|
424
|
-
* resizing or moving its components.
|
|
425
|
-
* @extends module:boxes/ActiveBoxBag.ActiveBoxBag
|
|
426
|
-
*/
|
|
427
|
-
class ActiveBoxGrid extends _ActiveBoxBag_js__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
428
|
-
/**
|
|
429
|
-
* ActiveBxGrid constructor
|
|
430
|
-
* @param {module:boxes/AbstractBox.AbstractBox} parent - The AbstractBox to which this box grid belongs
|
|
431
|
-
* @param {module:AWT.Container} container - The container where this box grid is placed.
|
|
432
|
-
* @param {module:boxes/BoxBase} boxBase - The object where colors, fonts, border and other graphic properties
|
|
433
|
-
* @param {number} px - `X` coordinate of the upper left corner of this box grid
|
|
434
|
-
* @param {number} py - `Y` coordinate of the upper left corner of this box grid
|
|
435
|
-
* @param {number} setWidth - Total width of the box grid
|
|
436
|
-
* @param {number} setHeight - Total height of the box grid
|
|
437
|
-
* @param {module:shapers/Shaper.Shaper} sh - Shaper used to build the ActiveBox objects
|
|
438
|
-
*/
|
|
439
|
-
constructor(parent, container, boxBase, px, py, setWidth, setHeight, sh) {
|
|
440
|
-
// ActiveBoxGrid derives from ActiveBoxBag
|
|
441
|
-
super(parent, container, boxBase);
|
|
442
|
-
|
|
443
|
-
this.nCols = sh.nCols;
|
|
444
|
-
this.nRows = sh.nRows;
|
|
445
|
-
|
|
446
|
-
// This will be the enclosing rectangle of this ActiveBox bag
|
|
447
|
-
const r = new _AWT_js__WEBPACK_IMPORTED_MODULE_2__/* .Rectangle */ .M_(
|
|
448
|
-
new _AWT_js__WEBPACK_IMPORTED_MODULE_2__/* .Point */ .bR(px, py),
|
|
449
|
-
new _AWT_js__WEBPACK_IMPORTED_MODULE_2__/* .Dimension */ .fg(
|
|
450
|
-
Math.round(setWidth / this.nCols) * this.nCols,
|
|
451
|
-
Math.round(setHeight / this.nRows) * this.nRows));
|
|
452
|
-
|
|
453
|
-
// Create all the [ActiveBox](ActiveBox.html) objects based on the
|
|
454
|
-
// shapes provided by the [Shaper](Shaper.html)
|
|
455
|
-
for (let i = 0; i < sh.nCells; i++) {
|
|
456
|
-
const
|
|
457
|
-
tmpSh = sh.getShape(i, r),
|
|
458
|
-
bx = new _ActiveBox_js__WEBPACK_IMPORTED_MODULE_1__["default"](this, container, boxBase, i, tmpSh.getBounds());
|
|
459
|
-
if (!sh.rectangularShapes)
|
|
460
|
-
bx.setShape(tmpSh);
|
|
461
|
-
this.addActiveBox(bx);
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
// If the Shaper has `remainder` (extra space), set the background box of this
|
|
465
|
-
// [BoxBag](BoxBag.html)
|
|
466
|
-
if (sh.hasRemainder) {
|
|
467
|
-
const
|
|
468
|
-
tmpSh = sh.getRemainderShape(r),
|
|
469
|
-
bx = new _ActiveBox_js__WEBPACK_IMPORTED_MODULE_1__["default"](this, container, boxBase, 0, tmpSh.getBounds());
|
|
470
|
-
bx.setShape(tmpSh);
|
|
471
|
-
this.setBackgroundBox(bx);
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
/**
|
|
476
|
-
* This factory constructor creates a new empty grid with the number of cells indicated by the
|
|
477
|
-
* {@link module:boxes/ActiveBagContent.ActiveBagContent ActiveBagContent} `abc`, not filling the cells with any content.
|
|
478
|
-
* @param {module:boxes/AbstractBox.AbstractBox} parent - The AbstractBox to which this box grid belongs
|
|
479
|
-
* @param {module:AWT.Container} container - The container where this box grid is placed.
|
|
480
|
-
* @param {number} px - `X` coordinate of the upper left corner of this box grid
|
|
481
|
-
* @param {number} py - `Y` coordinate of the upper left corner of this box grid
|
|
482
|
-
* @param {module:boxes/ActiveBagContent.ActiveBagContent} abc - Used only to get the number of cells and the shaper (when `sh` is `null`)
|
|
483
|
-
* @param {module:shapers/Shaper.Shaper} sh - Shaper used to build the ActiveBox objects
|
|
484
|
-
* @param {module:boxes/BoxBase.BoxBase} boxBase - The object where colors, fonts, border and other graphic properties
|
|
485
|
-
* of this box grid are defined.
|
|
486
|
-
* @returns {module:boxes/ActiveBoxGrid.ActiveBoxGrid}
|
|
487
|
-
*/
|
|
488
|
-
static createEmptyGrid(parent, container, px, py, abc, sh, boxBase) {
|
|
489
|
-
const result = abc ? new ActiveBoxGrid(parent, container,
|
|
490
|
-
boxBase || abc.style,
|
|
491
|
-
px, py,
|
|
492
|
-
abc.getTotalWidth(), abc.getTotalHeight(),
|
|
493
|
-
sh || abc.getShaper()) : null;
|
|
494
|
-
|
|
495
|
-
if (result)
|
|
496
|
-
result.setBorder(abc.border);
|
|
497
|
-
|
|
498
|
-
return result;
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
/**
|
|
502
|
-
* Gets the minimum size of this grid
|
|
503
|
-
* @returns {module:AWT.Dimension}
|
|
504
|
-
*/
|
|
505
|
-
getMinimumSize() {
|
|
506
|
-
return new _AWT_js__WEBPACK_IMPORTED_MODULE_2__/* .Dimension */ .fg(
|
|
507
|
-
_Utils_js__WEBPACK_IMPORTED_MODULE_3__/* .settings */ .W0.MIN_CELL_SIZE * this.nCols,
|
|
508
|
-
_Utils_js__WEBPACK_IMPORTED_MODULE_3__/* .settings */ .W0.MIN_CELL_SIZE * this.nRows);
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
/**
|
|
512
|
-
* Gets a scaled size of this grid, rounded to the nearest integer values
|
|
513
|
-
* @param {number} scale - The scale factor
|
|
514
|
-
* @returns {module:AWT.Dimension}
|
|
515
|
-
*/
|
|
516
|
-
getScaledSize(scale) {
|
|
517
|
-
return new _AWT_js__WEBPACK_IMPORTED_MODULE_2__/* .Dimension */ .fg(
|
|
518
|
-
(0,_Utils_js__WEBPACK_IMPORTED_MODULE_3__/* .roundTo */ .GB)(scale * this.preferredBounds.dim.width, this.nCols),
|
|
519
|
-
(0,_Utils_js__WEBPACK_IMPORTED_MODULE_3__/* .roundTo */ .GB)(scale * this.preferredBounds.dim.height, this.nRows));
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
/**
|
|
523
|
-
* Returns the logical coordinates of the provided {@link module:boxes/ActiveBox.ActiveBox ActiveBox}.
|
|
524
|
-
* The units of the result are not pixels, but ordinal numbers (relative positions) of columns
|
|
525
|
-
* and rows in the grid.
|
|
526
|
-
* @param {module:boxes/ActiveBox.ActiveBox} bx - The box to process
|
|
527
|
-
* @returns {module:AWT.Point}
|
|
528
|
-
*/
|
|
529
|
-
getCoord(bx) {
|
|
530
|
-
return new _AWT_js__WEBPACK_IMPORTED_MODULE_2__/* .Point */ .bR(bx.idLoc % this.nCols, Math.floor(bx.idLoc / this.nCols));
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
/**
|
|
534
|
-
* Calculates the logical distance between two {@link module:boxes/ActiveBox.ActiveBox ActiveBox} objects.
|
|
535
|
-
* Resulting units are not pixels, but ordinal numbers (relative positions) of columns and rows
|
|
536
|
-
* in the grid.
|
|
537
|
-
* @param {module:boxes/ActiveBox.ActiveBox} src - First box
|
|
538
|
-
* @param {module:boxes/ActiveBox.ActiveBox} dest - Second box
|
|
539
|
-
* @returns {module:AWT.Point}
|
|
540
|
-
*/
|
|
541
|
-
getCoordDist(src, dest) {
|
|
542
|
-
const
|
|
543
|
-
ptSrc = this.getCoord(src),
|
|
544
|
-
ptDest = this.getCoord(dest);
|
|
545
|
-
return new _AWT_js__WEBPACK_IMPORTED_MODULE_2__/* .Point */ .bR(ptDest.x - ptSrc.x, ptDest.y - ptSrc.y);
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
Object.assign(ActiveBoxGrid.prototype, {
|
|
550
|
-
/**
|
|
551
|
-
* Number of columns of this box grid
|
|
552
|
-
* @name module:boxes/ActiveBoxGrid.ActiveBoxGrid#nCols
|
|
553
|
-
* @type {number} */
|
|
554
|
-
nCols: 1,
|
|
555
|
-
/**
|
|
556
|
-
* Number of rows of this box grid
|
|
557
|
-
* @name module:boxes/ActiveBoxGrid.ActiveBoxGrid#nRows
|
|
558
|
-
* @type {number} */
|
|
559
|
-
nRows: 1,
|
|
560
|
-
});
|
|
561
|
-
|
|
562
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ActiveBoxGrid);
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
/***/ }),
|
|
566
|
-
|
|
567
|
-
/***/ 4921:
|
|
568
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
569
|
-
|
|
570
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
571
|
-
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
572
|
-
/* harmony export */ });
|
|
573
|
-
/* unused harmony export Rectangular */
|
|
574
|
-
/* harmony import */ var _Shaper_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8276);
|
|
575
|
-
/* harmony import */ var _AWT_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7912);
|
|
576
|
-
/**
|
|
577
|
-
* File : shapers/Rectangular.js
|
|
578
|
-
* Created : 19/05/2015
|
|
579
|
-
* By : Francesc Busquets <francesc@gmail.com>
|
|
580
|
-
*
|
|
581
|
-
* JClic.js
|
|
582
|
-
* An HTML5 player of JClic activities
|
|
583
|
-
* https://projectestac.github.io/jclic.js
|
|
584
|
-
*
|
|
585
|
-
* @source https://github.com/projectestac/jclic.js
|
|
586
|
-
*
|
|
587
|
-
* @license EUPL-1.2
|
|
588
|
-
* @licstart
|
|
589
|
-
* (c) 2000-2020 Catalan Educational Telematic Network (XTEC)
|
|
590
|
-
*
|
|
591
|
-
* Licensed under the EUPL, Version 1.1 or -as soon they will be approved by
|
|
592
|
-
* the European Commission- subsequent versions of the EUPL (the "Licence");
|
|
593
|
-
* You may not use this work except in compliance with the Licence.
|
|
594
|
-
*
|
|
595
|
-
* You may obtain a copy of the Licence at:
|
|
596
|
-
* https://joinup.ec.europa.eu/software/page/eupl
|
|
597
|
-
*
|
|
598
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
599
|
-
* distributed under the Licence is distributed on an "AS IS" basis, WITHOUT
|
|
600
|
-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
601
|
-
* Licence for the specific language governing permissions and limitations
|
|
602
|
-
* under the Licence.
|
|
603
|
-
* @licend
|
|
604
|
-
* @module
|
|
605
|
-
*/
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
/**
|
|
611
|
-
*
|
|
612
|
-
* This is the simplest {@link module:shapers/Shaper.Shaper Shaper}. It divides the graphic object in a set of rectangular
|
|
613
|
-
* shapes distributed in the specified number of rows and columns.
|
|
614
|
-
* @extends module:shapers/Shaper.Shaper
|
|
615
|
-
*/
|
|
616
|
-
class Rectangular extends _Shaper_js__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
617
|
-
/**
|
|
618
|
-
* Rectangular constructor
|
|
619
|
-
* @param {number} nx - Number of columns
|
|
620
|
-
* @param {number} ny - Number of rows
|
|
621
|
-
*/
|
|
622
|
-
constructor(nx, ny) {
|
|
623
|
-
super(nx, ny);
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
/**
|
|
627
|
-
* Builds the rectangular shapes based on the number of rows and columns
|
|
628
|
-
* @override
|
|
629
|
-
*/
|
|
630
|
-
buildShapes() {
|
|
631
|
-
const
|
|
632
|
-
w = 1 / this.nCols,
|
|
633
|
-
h = 1 / this.nRows;
|
|
634
|
-
for (let y = 0; y < this.nRows; y++) {
|
|
635
|
-
for (let x = 0; x < this.nCols; x++) {
|
|
636
|
-
this.shapeData[y * this.nCols + x] = new _AWT_js__WEBPACK_IMPORTED_MODULE_1__/* .Rectangle */ .M_(new _AWT_js__WEBPACK_IMPORTED_MODULE_1__/* .Point */ .bR(x * w, y * h), new _AWT_js__WEBPACK_IMPORTED_MODULE_1__/* .Dimension */ .fg(w, h));
|
|
637
|
-
}
|
|
638
|
-
}
|
|
639
|
-
this.initiated = true;
|
|
640
|
-
}
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
Object.assign(Rectangular.prototype, {
|
|
644
|
-
/**
|
|
645
|
-
* Overrides same flag in {@link module:/shapers/Shaper.Shaper#rectangularShapes Shaper#rectangularShapes}
|
|
646
|
-
* @name module:shapers/Rectangular.Rectangular#rectangularShapes
|
|
647
|
-
* @override
|
|
648
|
-
* @type {boolean} */
|
|
649
|
-
rectangularShapes: true,
|
|
650
|
-
});
|
|
651
|
-
|
|
652
|
-
// Register this class in the list of known shapers
|
|
653
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_Shaper_js__WEBPACK_IMPORTED_MODULE_0__["default"].registerClass('@Rectangular', Rectangular));
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
/***/ })
|
|
657
|
-
|
|
658
|
-
};
|
|
659
|
-
;
|
|
660
|
-
//# sourceMappingURL=2921.jclic-node.js.map
|