<commit_before>import RangeFilter from './range-filter';
import { View } from '../../../chart';
import { FilterCondition } from '../../../chart/interface';
import { each } from '@antv/util';

class SiblingFilter extends RangeFilter {
  // 获取同一级的 views
  private getSilbings(view: View) {
    const parent = view.parent;
    let siblings = null;
    if (parent) {
      siblings = parent.views.filter(sub => sub !== view);
    }
    return siblings;
  }
  // 对 view 进行过滤
  protected filterView(view: View, field: string, filter: FilterCondition) {
    const siblings = this.getSilbings(view);
    each(siblings, sibling => {
      sibling.filter(field, filter);
    });
  }
  
  // 重新渲染
  protected reRender(view: View) {
    const siblings = this.getSilbings(view);
    each(siblings, sibling => {
      sibling.render(true);
    });
  }
}

export default SiblingFilter;<commit_msg>fix: fix error path<commit_after>import { each } from '@antv/util';
import { View } from '../../../chart';
import { FilterCondition } from '../../../interface';
import RangeFilter from './range-filter';

class SiblingFilter extends RangeFilter {
  // 获取同一级的 views
  private getSilbings(view: View) {
    const parent = view.parent;
    let siblings = null;
    if (parent) {
      siblings = parent.views.filter(sub => sub !== view);
    }
    return siblings;
  }
  // 对 view 进行过滤
  protected filterView(view: View, field: string, filter: FilterCondition) {
    const siblings = this.getSilbings(view);
    each(siblings, sibling => {
      sibling.filter(field, filter);
    });
  }

  // 重新渲染
  protected reRender(view: View) {
    const siblings = this.getSilbings(view);
    each(siblings, sibling => {
      sibling.render(true);
    });
  }
}

export default SiblingFilter;
{'fraction_non_alphanumeric': 0.14642451759364358, 'fraction_numerical': 0.0, 'mean_word_length': 2.979683972911964, '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': '3861610', 'n_tokens_mistral': 564, 'n_tokens_neox': 587, 'n_words': 140}