Commit cc72ee8adb704dde256fb14fb4f3a71bcc308c5f
1 parent
63b9d0e2
Exists in
master
and in
1 other branch
Finalização da configuração da mão esquerda.
Showing
13 changed files
with
54 additions
and
44 deletions
Show diff stats
view/assets/css/main.css
... | ... | @@ -328,7 +328,7 @@ ul.rig.columns-4 li { |
328 | 328 | .box-panel-option { |
329 | 329 | max-width: 100%; |
330 | 330 | border-radius: 5px; |
331 | - border: 3px solid rgb(128, 168, 210); | |
331 | + border: 3px solid #80A8D2; | |
332 | 332 | box-sizing: border-box; |
333 | 333 | -moz-box-sizing: border-box; |
334 | 334 | -webkit-box-sizing: border-box; |
... | ... | @@ -340,6 +340,10 @@ ul.rig.columns-4 li { |
340 | 340 | border-color: #9678b0; |
341 | 341 | } |
342 | 342 | |
343 | +.box-panel-option[select=false] { | |
344 | + border-color: #80A8D2; | |
345 | +} | |
346 | + | |
343 | 347 | /* Facial Expression Configuration */ |
344 | 348 | #facial-expression { |
345 | 349 | display: none; |
... | ... | @@ -383,6 +387,14 @@ ul.rig.columns-4 li { |
383 | 387 | border-radius: 5px; |
384 | 388 | } |
385 | 389 | |
390 | +.subconfiguration-options .icon_container[active=false] { | |
391 | + display: none; | |
392 | +} | |
393 | + | |
394 | +.subconfiguration-options .icon_container[active=true] { | |
395 | + display: inline-block; | |
396 | +} | |
397 | + | |
386 | 398 | .subconfiguration-options .icon_container { |
387 | 399 | display: inline-block; |
388 | 400 | padding-left: 8px; | ... | ... |
view/assets/js/articulation.js
... | ... | @@ -13,7 +13,7 @@ |
13 | 13 | function _setupModuleZ(hand) { |
14 | 14 | if (typeof selectedY == 'undefined' || selectedY == '') return; |
15 | 15 | |
16 | - var base_id = '.selection-panel-body[mainConfig=right-hand][subConfig=articulacao][step=2]'; | |
16 | + var base_id = '.selection-panel-body[mainConfig=' + hand + '][subConfig=articulacao][step=2]'; | |
17 | 17 | var articulation_z = base_id + ' .module-z'; |
18 | 18 | $(articulation_z + ' .ball-selector').hide(); |
19 | 19 | $(articulation_z + ' .row-number-' + selectedY + ' .ball-selector').show(); |
... | ... | @@ -26,7 +26,7 @@ |
26 | 26 | } |
27 | 27 | |
28 | 28 | function _setupBallSelectorXY(hand) { |
29 | - var base_id = '.selection-panel-body[mainConfig=right-hand][subConfig=articulacao][step=1]'; | |
29 | + var base_id = '.selection-panel-body[mainConfig=' + hand + '][subConfig=articulacao][step=1]'; | |
30 | 30 | var articulation_x_y = base_id + ' .module-x-y'; |
31 | 31 | $(articulation_x_y + ' .ball-selector').off('click').on('click', function(a) { |
32 | 32 | var b = $(a.target); |
... | ... | @@ -42,13 +42,13 @@ |
42 | 42 | selectedY = g; |
43 | 43 | _setupModuleZ(hand); |
44 | 44 | |
45 | - wikilibras.updateTempParameterJSON('right-hand', 'articulacao', '1', f + ';' + g); | |
45 | + wikilibras.updateTempParameterJSON(hand, 'articulacao', '1', f + ';' + g); | |
46 | 46 | dynworkflow.userSelectedAnOption(); |
47 | 47 | }); |
48 | 48 | } |
49 | 49 | |
50 | 50 | function _setupBallSelectorZ(hand) { |
51 | - var base_id = '.selection-panel-body[mainConfig=right-hand][subConfig=articulacao][step=2]'; | |
51 | + var base_id = '.selection-panel-body[mainConfig=' + hand + '][subConfig=articulacao][step=2]'; | |
52 | 52 | var articulation_z = base_id + ' .module-z'; |
53 | 53 | $(articulation_z + ' .ball-selector').off('click').on('click', function(a) { |
54 | 54 | var b = $(a.target); |
... | ... | @@ -61,7 +61,7 @@ |
61 | 61 | h = b.attr('data-z'); |
62 | 62 | b.attr('data-z') && e.attr('data-z', h), _updateASelector(articulation_z, b); |
63 | 63 | |
64 | - wikilibras.updateTempParameterJSON('right-hand', 'articulacao', '2', h); | |
64 | + wikilibras.updateTempParameterJSON(hand, 'articulacao', '2', h); | |
65 | 65 | dynworkflow.userSelectedAnOption(); |
66 | 66 | }); |
67 | 67 | } |
... | ... | @@ -91,18 +91,15 @@ |
91 | 91 | return _calculateArticulationPointIndex(hand, xValue, yValue, zValue); |
92 | 92 | }; |
93 | 93 | |
94 | - articulation.setupModuleXY = function(serverhost) { | |
94 | + articulation.setupModuleXY = function(serverhost, hand) { | |
95 | 95 | server_host = serverhost; |
96 | - _setupBallSelectorXY('right-hand'); | |
97 | - _setupBallSelectorXY('left-hand'); | |
96 | + _setupBallSelectorXY(hand); | |
98 | 97 | }; |
99 | 98 | |
100 | - articulation.setupModuleZ = function(serverhost) { | |
99 | + articulation.setupModuleZ = function(serverhost, hand) { | |
101 | 100 | server_host = serverhost; |
102 | - _setupBallSelectorZ('right-hand'); | |
103 | - _setupBallSelectorZ('left-hand'); | |
104 | - _setupModuleZ('right-hand'); | |
105 | - _setupModuleZ('left-hand'); | |
101 | + _setupBallSelectorZ(hand); | |
102 | + _setupModuleZ(hand); | |
106 | 103 | }; |
107 | 104 | |
108 | 105 | }(window.articulation = window.articulation || {}, jQuery)); | ... | ... |
view/assets/js/configuration.js
1 | 1 | (function(configuration, $, undefined) { |
2 | 2 | |
3 | - configuration.setupFingersGroup = function() { | |
4 | - var baseId = '.selection-panel-body[mainConfig=right-hand][subConfig=configuracao][step=1]'; | |
3 | + configuration.setupFingersGroup = function(hand) { | |
4 | + var baseId = '.selection-panel-body[mainConfig=' + hand + '][subConfig=configuracao][step=1]'; | |
5 | 5 | $(baseId + ' .selection-panel-option' |
6 | 6 | ).off('click').on('click', function() { |
7 | 7 | wikilibras.selectAnOption(baseId, this); |
... | ... | @@ -9,15 +9,15 @@ |
9 | 9 | }); |
10 | 10 | }; |
11 | 11 | |
12 | - configuration.setupFingersPosition = function() { | |
13 | - var stepTwoBaseId = '.selection-panel-body[mainConfig=right-hand][subConfig=configuracao][step=2]'; | |
12 | + configuration.setupFingersPosition = function(hand) { | |
13 | + var stepTwoBaseId = '.selection-panel-body[mainConfig=' + hand + '][subConfig=configuracao][step=2]'; | |
14 | 14 | $(stepTwoBaseId + ' .selection-panel-option').off('click').on( |
15 | 15 | 'click', function() { |
16 | 16 | wikilibras.selectAnOption(stepTwoBaseId, this); |
17 | 17 | dynworkflow.userSelectedAnOption(); |
18 | 18 | }); |
19 | 19 | |
20 | - var stepOneBaseId = '.selection-panel-body[mainConfig=right-hand][subConfig=configuracao][step=1]'; | |
20 | + var stepOneBaseId = '.selection-panel-body[mainConfig=' + hand + '][subConfig=configuracao][step=1]'; | |
21 | 21 | var finger_group = $(stepOneBaseId + ' .selection-panel-option[select=true]').attr('value'); |
22 | 22 | finger_group = typeof finger_group == 'undefined' ? '0' : finger_group; |
23 | 23 | $(stepTwoBaseId + ' .finger-group').hide(); | ... | ... |
view/assets/js/dynamic-loading-engine.js
... | ... | @@ -3,30 +3,30 @@ |
3 | 3 | |
4 | 4 | _preprocessHtml = function(data, url) { |
5 | 5 | var matchSubConfig = data.match(/sub(?:C|c)onfig="(.*?)"/); |
6 | + var currentMainConfig = dynworkflow.getMainConfig(); // right-hand or left-hand | |
6 | 7 | var goodData = data; |
7 | 8 | |
8 | 9 | var isRightHand = function(hand) { |
9 | 10 | return hand === 'right-hand'; |
10 | 11 | }; |
11 | - | |
12 | - if (matchMainConfig && matchSubConfig) { // case defined | |
12 | + | |
13 | + if (matchSubConfig) { // case defined | |
13 | 14 | // There is no specific(right or left hand dependent) assets for: articulacao, duracao, expressao, movimento, transicao |
14 | 15 | // Specific configurations: configuracao, orientacao |
15 | 16 | // possible values on the side as comment |
16 | - var hand = dynworkflow.getMainConfig(); // right-hand or left-hand | |
17 | 17 | var subConfig = matchSubConfig[1]; // articulacao | configuracao | duracao | expressao | movimento | orientacao | transicao |
18 | 18 | |
19 | 19 | // possible subconfigs that need changing |
20 | 20 | switch (subConfig) { |
21 | 21 | case 'configuracao': |
22 | - if (isRightHand(hand)) { | |
22 | + if (isRightHand(currentMainConfig)) { | |
23 | 23 | goodData = data.replace(/{{ configuracao }}/g, 'cmd'); |
24 | 24 | } else { |
25 | 25 | goodData = data.replace(/{{ configuracao }}/g, 'cme'); |
26 | 26 | } |
27 | 27 | break; |
28 | 28 | case 'orientacao': |
29 | - if (isRightHand(hand)) { | |
29 | + if (isRightHand(currentMainConfig)) { | |
30 | 30 | goodData = data.replace(/{{ orientacao }}/g, 'ord'); |
31 | 31 | } else { |
32 | 32 | goodData = data.replace(/{{ orientacao }}/g, 'ore'); |
... | ... | @@ -35,10 +35,9 @@ |
35 | 35 | default: |
36 | 36 | console.log('No subConfig found'); |
37 | 37 | } |
38 | - | |
39 | - // change {{ hand }} | |
40 | - goodData = data.replace(/{{ hand }}/g, hand); | |
41 | 38 | } |
39 | + // change {{ hand }} | |
40 | + goodData = goodData.replace(/{{ hand }}/g, currentMainConfig); | |
42 | 41 | return goodData.replace(/{{ server }}/g, url); |
43 | 42 | }; |
44 | 43 | ... | ... |
view/assets/js/dynamic-selection-workflow.js
... | ... | @@ -198,13 +198,15 @@ |
198 | 198 | } |
199 | 199 | |
200 | 200 | function _setupTimelineIcons(timelineBaseId) { |
201 | - $(timelineBaseId + ' .icon_container[json_name]').hide(); | |
201 | + $(timelineBaseId + ' .icon_container[json_name]').attr("active", "false"); | |
202 | 202 | |
203 | 203 | for (var name in currentSubconfigParent) { |
204 | - $(timelineBaseId + ' .icon_container[json_name=' + name + ']').show(); | |
204 | + //$(timelineBaseId + ' .icon_container[json_name=' + name + ']').show(); | |
205 | + $(timelineBaseId + ' .icon_container[json_name]').attr("active", "true"); | |
205 | 206 | } |
207 | + | |
206 | 208 | if (preprocessedMainConfig == 'hand') { |
207 | - $(timelineBaseId + ' .icon_container[json_name=movimento]').show(); | |
209 | + $(timelineBaseId + ' .icon_container[json_name=movimento]').attr("active", "true"); | |
208 | 210 | _setupCheckIcon(mainConfig, 'movimento'); |
209 | 211 | _selectTimelineIcon(mainConfig, currentSubConfigName); |
210 | 212 | } |
... | ... | @@ -267,7 +269,7 @@ |
267 | 269 | dynworkflow.getMovementParameters = function(movementName) { |
268 | 270 | return _getAttributes(jsonWF['hand']['movimento'][movementName]); |
269 | 271 | }; |
270 | - | |
272 | + | |
271 | 273 | dynworkflow.getMainConfig = function() { |
272 | 274 | return mainConfig; |
273 | 275 | }; | ... | ... |
view/assets/js/facial.js
1 | 1 | (function(facial, $, undefined) { |
2 | 2 | |
3 | - facial.setup = function() { | |
4 | - var baseId = '.selection-panel-body[mainConfig=facial]'; | |
3 | + facial.setup = function(subConfig) { | |
4 | + var baseId = '.selection-panel-body[mainConfig=facial][subConfig=' + subConfig + ']'; | |
5 | 5 | $(baseId + ' .selection-panel-option').off('click').on( |
6 | 6 | 'click', function() { |
7 | 7 | wikilibras.selectAnOption(baseId, this); | ... | ... |
view/assets/js/movement.js
... | ... | @@ -5,8 +5,8 @@ |
5 | 5 | '][subConfig=movimento][step=1] .selection-panel-option[select=true]').attr('value'); |
6 | 6 | }; |
7 | 7 | |
8 | - movement.setup = function(serverhost) { | |
9 | - var baseId = '.selection-panel-body[mainConfig=right-hand][subConfig=movimento][step=1]'; | |
8 | + movement.setup = function(serverhost, hand) { | |
9 | + var baseId = '.selection-panel-body[mainConfig=' + hand + '][subConfig=movimento][step=1]'; | |
10 | 10 | $(baseId + ' .selection-panel-option').off('click').on( |
11 | 11 | 'click', function() { |
12 | 12 | wikilibras.selectAnOption(baseId, this); | ... | ... |
view/assets/js/orientation.js
1 | 1 | (function(orientation, $, undefined) { |
2 | 2 | |
3 | - orientation.setup = function() { | |
4 | - var baseId = '.selection-panel-body[mainConfig=right-hand][subConfig=orientacao][step=1]'; | |
3 | + orientation.setup = function(hand) { | |
4 | + var baseId = '.selection-panel-body[mainConfig=' + hand + '][subConfig=orientacao][step=1]'; | |
5 | 5 | $(baseId + ' .selection-panel-option').off('click').on( |
6 | 6 | 'click', function() { |
7 | 7 | wikilibras.selectAnOption(baseId, this); | ... | ... |
view/assets/js/tmpJSONParser.js
view/assets/js/wikilibras.js
... | ... | @@ -80,9 +80,9 @@ |
80 | 80 | |
81 | 81 | function _isConfigurationComplete(config) { |
82 | 82 | var baseId = '.subconfiguration-panel[mainConfig=' + config + ']'; |
83 | - var total_config = $(baseId + ' .icon_container[json_name]:visible').length; | |
83 | + var total_config = $(baseId + ' .icon_container[json_name][active=true]').length; | |
84 | 84 | var completed_config = $(baseId + ' .icon_container[complete=true]').length; |
85 | - return total_config == completed_config; | |
85 | + return completed_config != 0 && total_config == completed_config; | |
86 | 86 | } |
87 | 87 | |
88 | 88 | function _canHover(el) { |
... | ... | @@ -256,8 +256,7 @@ |
256 | 256 | } |
257 | 257 | |
258 | 258 | function _selectAnOption(parentId, el) { |
259 | - $(parentId + ' .selection-panel-option[select=true]').removeAttr( | |
260 | - 'select'); | |
259 | + $(parentId + ' .selection-panel-option[select=true]').attr('select', false); | |
261 | 260 | $(el).attr('select', true); |
262 | 261 | |
263 | 262 | var mainConfig = $(parentId).attr('mainConfig'); | ... | ... |
view/facial/duracao/passo-1.html
view/facial/expressao/passo-1.html