Welcome to mirror list, hosted at ThFree Co, Russian Federation.

network.js « network « projects « pages « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5f2014f1631d02f26232400b95f0ce0574316293 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import $ from 'jquery';
import BranchGraph from '../../../network/branch_graph';

const vph = $(window).height() - 250;

export default class Network {
  constructor(opts) {
    this.opts = opts;
    this.filter_ref = $('#filter_ref');
    this.network_graph = $('.network-graph');
    this.filter_ref.click(() => this.submit());
    this.branch_graph = new BranchGraph(this.network_graph, this.opts);
    this.network_graph.css({ height: `${vph}px` });
  }

  submit() {
    return this.filter_ref.closest('form').submit();
  }
}