<commit_before><template>
    <div class="scroller" v-bind:class="{ 'is-draging': isDraging === true }" v-on:scroll="onScroll">
        <slot name="content"></slot>
    </div>
</template>

<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';

@Component({})
export default class GuideScroller extends Vue {
    public isDraging: boolean = false;

    private isPushed: boolean = false; // 押されているか
    private baseClientX: number = 0;
    private baseClientY: number = 0;
    private clickTimer: number | undefined;

    // 各種イベントリスナー
    private mousedownListener = ((e: MouseEvent): void => {
        this.onMousedown(e);
    }).bind(this);
    private mouseupListener = ((): void => {
        this.onMouseup();
    }).bind(this);
    private mousemoveListener = ((e: MouseEvent): void => {
        this.onMousemove(e);
    }).bind(this);

    public mounted(): void {
        document.addEventListener('mousedown', this.mousedownListener, false);
        document.addEventListener('mouseup', this.mouseupListener, false);
        document.addEventListener('mousemove', this.mousemoveListener, false);
    }

    public beforeDestroy(): void {
        document.removeEventListener('mousedown', this.mousedownListener, false);
        document.removeEventListener('mouseup', this.mouseupListener, false);
        document.removeEventListener('mousemove', this.mousemoveListener, false);
    }

    public onScroll(e: Event): void {
        this.$emit('scroll', e);
    }

    public onMousedown(e: MouseEvent): void {
        this.isPushed = true;
        this.baseClientX = e.clientX;
        this.baseClientY = e.clientY;
    }

    public onMouseup(): void {
        this.isPushed = false;
    }

    public onMousemove(e: MouseEvent): void {
        if (this.isPushed === false) {
            return;
        }

        this.isDraging = true;

        this.$el.scrollLeft += this.baseClientX - e.clientX;
        this.$el.scrollTop += this.baseClientY - e.clientY;<commit_msg>ダイアログ表示時にドラッグ操作で番組表をスクロールしないように修正 #470<commit_after><template>
    <div class="scroller" v-bind:class="{ 'is-draging': isDraging === true }" v-on:scroll="onScroll">
        <slot name="content"></slot>
    </div>
</template>

<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';

@Component({})
export default class GuideScroller extends Vue {
    public isDraging: boolean = false;

    private isPushed: boolean = false; // 押されているか
    private baseClientX: number = 0;
    private baseClientY: number = 0;
    private clickTimer: number | undefined;

    // 各種イベントリスナー
    private mousedownListener = ((e: MouseEvent): void => {
        this.onMousedown(e);
    }).bind(this);
    private mouseupListener = ((): void => {
        this.onMouseup();
    }).bind(this);
    private mousemoveListener = ((e: MouseEvent): void => {
        this.onMousemove(e);
    }).bind(this);

    public mounted(): void {
        (this.$el as HTMLElement).addEventListener('mousedown', this.mousedownListener, false);
        document.addEventListener('mouseup', this.mouseupListener, false);
        document.addEventListener('mousemove', this.mousemoveListener, false);
    }

    public beforeDestroy(): void {
        (this.$el as HTMLElement).removeEventListener('mousedown', this.mousedownListener, false);
        document.removeEventListener('mouseup', this.mouseupListener, false);
        document.removeEventListener('mousemove', this.mousemoveListener, false);
    }

    public onScroll(e: Event): void {
        this.$emit('scroll', e);
    }

    public onMousedown(e: MouseEvent): void {
        this.isPushed = true;
        this.baseClientX = e.clientX;
        this.baseClientY = e.clientY;
    }

    public onMouseup(): void {
        this.isPushed = false;
    }

    public onMousemove(e: MouseEvent): void {
        if (this.isPushed === false) {
            return;
        }

        this.isDraging = true;

        this.$el.scrollLeft += this.baseClientX - e.clientX;
        this.$el.scrollTop += this.baseClientY - e.clientY;
{'fraction_non_alphanumeric': 0.13751537515375153, 'fraction_numerical': 0.0017220172201722018, 'mean_word_length': 2.994106090373281, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 23, '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': '6531409', 'n_tokens_mistral': 1285, 'n_tokens_neox': 1241, 'n_words': 260}