Skip to content

Commit 472b8b0

Browse files
committed
update tutorial 1 to use the quick text button (resolves #246)
1 parent a4b3df4 commit 472b8b0

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

  • resources/js/tutorials

resources/js/tutorials/1.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,25 +66,23 @@ function Intro3() {
6666
position: "right"
6767
},
6868
{
69-
element: document.querySelector('#filteredBlocksArea .e-text'),
69+
element: document.querySelector('.scriptingArea .e-h1 .c-quicktext'),
7070
tooltipClass: "intro-hidebuttons",
71-
intro: "This is the <code>text</code> block. Drag it into the <code>heading</code> block.",
71+
intro: "Click this button to add text to the empty <code>heading</code>.",
7272
position: "right"
7373
}
7474
]
7575
});
7676
intro3.start();
7777

7878
intro3.onafterchange(function(e) {
79-
if (e.classList.contains('e-text')) {
79+
if (e.classList.contains('c-quicktext')) {
8080
//accommodate for IntroJS's lame incompatability with scrolling
8181
document.querySelector('.introjs-helperLayer').style.top = (document.querySelector('.introjs-helperLayer').style.top.replace("px", "") - document.querySelector('#filteredBlocksArea').scrollTop) + "px";
8282
document.querySelector('.introjs-tooltipReferenceLayer').style.top = (document.querySelector('.introjs-tooltipReferenceLayer').style.top.replace("px", "") - document.querySelector('#filteredBlocksArea').scrollTop) + "px";
83-
document.body.classList.add("intro-hideoverlay");
84-
introObserve(document.querySelector('#filteredBlocksArea .e-text'), "mousedown",
83+
introObserve(document.querySelector('.scriptingArea .e-text'), "mousedown",
8584
false, document.querySelector('.e-body'), '.e-body .e-h1 .e-text', function() {
8685
intro3.exit();
87-
document.body.classList.remove("intro-hideoverlay");
8886
Intro4();
8987
});
9088
}
@@ -129,4 +127,4 @@ function Intro4() {
129127
});
130128
}
131129

132-
var startTutorial = Intro1;
130+
var startTutorial = Intro1;

0 commit comments

Comments
 (0)