Skip to content

Commit 9dcfda2

Browse files
committed
Fix tutorial 2 step SRI population
1 parent 3d2794f commit 9dcfda2

2 files changed

Lines changed: 17 additions & 8 deletions

File tree

webapp/components/general/TutorialBubble.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,17 +121,15 @@ const TutorialBubble = ({
121121

122122
if (!tutorialTarget.current && currentTourStep !== requestedTourStep) {
123123
tutorialTarget.current = DOMtarget;
124-
let { waitFor } = tourStep;
124+
let { waitFor, grabGlobalClick } = tourStep;
125125
if (!waitFor) {
126126
waitFor = isAnyEditable(DOMtarget) ? 'fieldEdition' : 'click';
127127
}
128128
switch (waitFor) {
129129
case 'click':
130-
if (requestedTourStep === steps.length) {
131-
DOMtarget.addEventListener('click', stop, { once: true, capture: true });
132-
} else {
133-
DOMtarget.addEventListener('click', listen, { once: true, capture: true });
134-
}
130+
const nextAction = requestedTourStep === steps.length ? stop : listen;
131+
const listenerTarget = grabGlobalClick ? document : DOMtarget;
132+
listenerTarget.addEventListener('click', nextAction, { once: true, capture: true });
135133
break;
136134
case 'fieldEdition': // Do nothing, we wait for a click on "next"
137135
break;

webapp/redux/reducers/data/tutorial2_steps.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ const tutorial2_steps = [
201201
<div>
202202
<p>Click on the folder icon to select the template:</p>
203203
<p> NetPyNE-UI &gt; workspace</p>
204-
<p> &gt; cells &gt; PTcells.hoc</p>
204+
<p> &gt; cells &gt; SRI.hoc</p>
205205
</div>
206206
)
207207
},
@@ -333,10 +333,21 @@ const tutorial2_steps = [
333333
title: (
334334
<div>Population Creation</div>
335335
),
336+
content: (
337+
<p>Select the cell type</p>
338+
),
339+
waitFor: 'click',
340+
grabGlobalClick: true
341+
},
342+
{
343+
target: 'li[data-value^="SRI"]',
344+
title: (
345+
<div>Population Creation</div>
346+
),
336347
content: (
337348
<p>Select "SRI"</p>
338349
)
339-
}, //netParamspopParamsPopulation0numCells
350+
},
340351
{
341352
target: 'input[id^="netParamspopParams"][id$="numCells"]',
342353
title: (

0 commit comments

Comments
 (0)