<commit_before>﻿using System;
using Avalonia.Controls.Primitives;
using Avalonia.Input;

namespace Avalonia.Controls.PanAndZoom
{
    /// <summary>
    /// Pan and zoom control for Avalonia.
    /// </summary>
    public partial class ZoomBorder : ILogicalScrollable
    { 
        /// <inheritdoc/>
        Size IScrollable.Extent => _extent;

        /// <inheritdoc/>
        Vector IScrollable.Offset
        {
            get => _offset;
            set
            {
                if (!_isInvalidating)
                {
                    var (x, y) = _offset;
                    _offset = value;
                    var dx = x - _offset.X;
                    var dy = y - _offset.Y;
                    Log($"[Offset] offset: {_offset}, dx: {dx}, dy: {dy}");
                    PanDelta(dx, dy, false, !this.IsPointerOver);
                }
            }
        }

        /// <inheritdoc/><commit_msg>Update ZoomBorder.ILogicalScrollable.cs<commit_after>﻿using System;
using Avalonia.Controls.Primitives;
using Avalonia.Input;

namespace Avalonia.Controls.PanAndZoom
{
    /// <summary>
    /// Pan and zoom control for Avalonia.
    /// </summary>
    public partial class ZoomBorder : ILogicalScrollable
    { 
        /// <inheritdoc/>
        Size IScrollable.Extent => _extent;

        /// <inheritdoc/>
        Vector IScrollable.Offset
        {
            get => _offset;
            set
            {
                if (!_isInvalidating)
                {
                    var (x, y) = _offset;
                    _offset = value;
                    var dx = x - _offset.X;
                    var dy = y - _offset.Y;
                    PanDelta(dx, dy, false, !this.IsPointerOver);
                    Log($"[Offset] offset: {_offset}, dx: {dx}, dy: {dy}");
                }
            }
        }

        /// <inheritdoc/>
{'fraction_non_alphanumeric': 0.11600429645542427, 'fraction_numerical': 0.0, 'mean_word_length': 1.25, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 17, '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': '2276263', 'n_tokens_mistral': 542, 'n_tokens_neox': 514, 'n_words': 118}