Commit f488e8de authored by Mike Greiling's avatar Mike Greiling

Merge branch 'Remove-IIFEs-from-network.js' into 'master'

Remove IIFEs from network.js

See merge request gitlab-org/gitlab!19254
parents 21298dd9 7ece1120
/* eslint-disable func-names, no-var */
import $ from 'jquery'; import $ from 'jquery';
import BranchGraph from '../../../network/branch_graph'; import BranchGraph from '../../../network/branch_graph';
export default (function() { const vph = $(window).height() - 250;
function Network(opts) {
var vph; export default class Network {
$('#filter_ref').click(function() { constructor(opts) {
return $(this) this.opts = opts;
.closest('form') this.filter_ref = $('#filter_ref');
.submit(); this.network_graph = $('.network-graph');
}); this.filter_ref.click(() => this.submit());
this.branch_graph = new BranchGraph($('.network-graph'), opts); this.branch_graph = new BranchGraph(this.network_graph, this.opts);
vph = $(window).height() - 250; this.network_graph.css({ height: `${vph}px` });
$('.network-graph').css({
height: `${vph}px`,
});
} }
return Network; submit() {
})(); return this.filter_ref.closest('form').submit();
}
}
---
title: Removed IIFEs from network.js file
merge_request: 19254
author: nuwe1
type: other
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment