<commit_before>import { ModulVue } from '../../utils/vue/vue';
import { PluginObject } from 'vue';
import Component from 'vue-class-component';
import { Prop, Watch } from 'vue-property-decorator';
import WithRender from './steppers.html?style=./steppers.scss';
import { STEPPERS_NAME } from '../component-names';
import NavBarItemPlugin, { BaseSteppers, MSteppersItemState } from '../steppers-item/steppers-item';
import { ElementQueries } from '../../mixins/element-queries/element-queries';

@WithRender
@Component({
    mixins: [ElementQueries]
})
export class MSteppers extends BaseSteppers {

    public setLineWidth(): void {
        let defaultLineEL: HTMLElement = this.$refs.defaultLine as HTMLElement;
        let selectedLineEL: HTMLElement = this.$refs.selectedLine as HTMLElement;
        let leftSpacing: number;
        let rightSpacing: number;
        this.$children.forEach((child, index, arr) => {
            if (index == 0 && arr.length >= 1) {
                leftSpacing = child.$el.clientWidth / 2;
            }
            if (arr.length - 1 === index && arr.length > 1) {
                rightSpacing = child.$el.clientWidth / 2;
            }
            if (child.$props.state == MSteppersItemState.InProgress) {
                let parentWidth = this.$el.clientWidth;
                let childWidth = child.$el.clientWidth;
                let childOffset = child.$el.offsetLeft;
                let lineWidth = ((childOffset - leftSpacing + (childWidth / 2)) / parentWidth) * 100;
                selectedLineEL.style.width = lineWidth + '%';
                selectedLineEL.style.left = leftSpacing + 'px';
            }
            defaultLineEL.style.left = leftSpacing + 'px';
            defaultLineEL.style.right = rightSpacing + 'px';
        });
    }<commit_msg>M-steppers - modification on line conditions<commit_after>import { ModulVue } from '../../utils/vue/vue';
import { PluginObject } from 'vue';
import Component from 'vue-class-component';
import { Prop, Watch } from 'vue-property-decorator';
import WithRender from './steppers.html?style=./steppers.scss';
import { STEPPERS_NAME } from '../component-names';
import NavBarItemPlugin, { BaseSteppers, MSteppersItemState } from '../steppers-item/steppers-item';
import { ElementQueries } from '../../mixins/element-queries/element-queries';

@WithRender
@Component({
    mixins: [ElementQueries]
})
export class MSteppers extends BaseSteppers {

    public setLineWidth(): void {
        let defaultLineEL: HTMLElement = this.$refs.defaultLine as HTMLElement;
        let selectedLineEL: HTMLElement = this.$refs.selectedLine as HTMLElement;
        let leftSpacing: number;
        let rightSpacing: number;
        this.$children.forEach((child, index, arr) => {
            if (index == 0 && arr.length >= 1) {
                leftSpacing = child.$el.clientWidth / 2;
            }
            if (arr.length - 1 === index && arr.length > 1) {
                rightSpacing = child.$el.clientWidth / 2;
            }
            if (child.$props.state == MSteppersItemState.InProgress || child.$props.state == MSteppersItemState.Completed) {
                let parentWidth = this.$el.clientWidth;
                let childWidth = child.$el.clientWidth;
                let childOffset = child.$el.offsetLeft;
                let lineWidth = ((childOffset - leftSpacing + (childWidth / 2)) / parentWidth) * 100;
                selectedLineEL.style.width = lineWidth + '%';
                selectedLineEL.style.left = leftSpacing + 'px';
            }
            defaultLineEL.style.left = leftSpacing + 'px';
            defaultLineEL.style.right = rightSpacing + 'px';
        });
    }
{'fraction_non_alphanumeric': 0.12740580103008944, 'fraction_numerical': 0.005421523448088913, 'mean_word_length': 2.4198331788693235, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '348020', 'n_tokens_mistral': 1083, 'n_tokens_neox': 1027, 'n_words': 238}