diff --git a/examples/lib/defaultHtmlStepUi.js b/examples/lib/defaultHtmlStepUi.js
index f1478444..0a9b23fd 100644
--- a/examples/lib/defaultHtmlStepUi.js
+++ b/examples/lib/defaultHtmlStepUi.js
@@ -15,8 +15,6 @@ const intermediateHtmlStepUi = require('./intermediateHtmlStepUi.js'),
scopeQuery = require('./scopeQuery');
function DefaultHtmlStepUi(_sequencer, options) {
- let $step, $stepAll;
-
options = options || {};
var stepsEl = options.stepsEl || document.querySelector('#steps');
var selectStepSel = options.selectStepSel = options.selectStepSel || '#selectStep';
@@ -70,12 +68,9 @@ function DefaultHtmlStepUi(_sequencer, options) {
var parser = new DOMParser();
step.ui = parser.parseFromString(step.ui, 'text/html');
step.ui = step.ui.querySelector('div.container-fluid');
-
- $step = scopeQuery.scopeSelector(step.ui);
- $stepAll = scopeQuery.scopeSelectorAll(step.ui);
- step.ui.$step = $step;
- step.ui.$stepAll = $stepAll;
-
+ step.$step = scopeQuery.scopeSelector(step.ui);
+ step.$stepAll = scopeQuery.scopeSelectorAll(step.ui);
+ let {$step, $stepAll} = step;
step.linkElements = step.ui.querySelectorAll('a');
step.imgElement = $step('a img.img-thumbnail')[0];
@@ -258,13 +253,14 @@ function DefaultHtmlStepUi(_sequencer, options) {
}
- function onDraw() {
+ function onDraw({$step, $stepAll}) {
$step('.load').show();
$step('img').hide();
$stepAll('.load-spin').show();
}
function onComplete(step) {
+ let {$step, $stepAll} = step;
$step('img').show();
$stepAll('.load-spin').hide();
$step('.load').hide();
diff --git a/examples/lib/intermediateHtmlStepUi.js b/examples/lib/intermediateHtmlStepUi.js
index a96f08e4..8383ef1c 100644
--- a/examples/lib/intermediateHtmlStepUi.js
+++ b/examples/lib/intermediateHtmlStepUi.js
@@ -75,8 +75,8 @@ function IntermediateHtmlStepUi(_sequencer, step, options) {
};
insertStep = function (id) {
- const $step = step.ui.$step,
- $stepAll = step.ui.$stepAll;
+ const $step = step.$step,
+ $stepAll = step.$stepAll;
var modulesInfo = _sequencer.modulesInfo();
var parser = new DOMParser();
var addStepUI = stepUI();
@@ -134,4 +134,4 @@ function IntermediateHtmlStepUi(_sequencer, step, options) {
insertStep
};
}
-module.exports = IntermediateHtmlStepUi;
\ No newline at end of file
+module.exports = IntermediateHtmlStepUi;