Skip to content

Commit fde47fb

Browse files
committed
renamed classes to attributes in functions names
1 parent d5ba54f commit fde47fb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/components/Tour.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export default defineComponent({
126126
onMounted(() => {
127127
tour = context.root.$tours['onboarding-tour'];
128128
129-
_addClasses(steps[currentStep.value].ui, currentStep.value);
129+
_addAttributes(steps[currentStep.value].ui, currentStep.value);
130130
// eslint-disable-next-line no-unused-expressions
131131
steps[currentStep.value].lifecycle?.onMountedStep?.(goToNextStep);
132132
@@ -173,13 +173,13 @@ export default defineComponent({
173173
await context.root.$nextTick();
174174
}
175175
176-
_addClasses(futureUI, futureStepIndex);
176+
_addAttributes(futureUI, futureStepIndex);
177177
178178
if (futurePage !== currentPage) {
179179
await sleep(500);
180180
}
181181
182-
_removeClasses(currentStepIndex);
182+
_removeAttributes(currentStepIndex);
183183
184184
tour!.start(futureStepIndex.toString());
185185
@@ -199,7 +199,7 @@ export default defineComponent({
199199
currentStep.value = futureStepIndex;
200200
}
201201
202-
function _addClasses(uiConfig: TourStep['ui'], stepIndex: TourStepIndex) {
202+
function _addAttributes(uiConfig: TourStep['ui'], stepIndex: TourStepIndex) {
203203
const elementsWithOpacity = uiConfig.elementsWithOpacity || [];
204204
const elementsWithoutInteractivity = uiConfig.elementsWithoutInteractivity || [];
205205
@@ -217,7 +217,7 @@ export default defineComponent({
217217
});
218218
}
219219
220-
function _removeClasses(stepIndex: TourStepIndex) {
220+
function _removeAttributes(stepIndex: TourStepIndex) {
221221
document.querySelectorAll(`[data-non-interactable="${stepIndex}"]`).forEach((el) => {
222222
el.removeAttribute('data-non-interactable');
223223
});
@@ -262,7 +262,7 @@ export default defineComponent({
262262
<style lang="scss">
263263
// Using data attribute instead of classes because it is easier to track which elements should be
264264
// updated with opacity and non-interactivity properties as data attributes allow to use a value like
265-
// [data-opaified="1"] although the CSS selector that we can use is [data-opacified]. @see _removeClasses
265+
// [data-opaified="1"] although the CSS selector that we can use is [data-opacified]. @see _removeAttributes
266266
267267
[data-opacified] {
268268
filter: opacity(0.3);

0 commit comments

Comments
 (0)