refactor Network class
This commit is contained in:
parent
3474271009
commit
b7bf9b41b0
2 changed files with 15 additions and 18 deletions
|
@ -2,20 +2,18 @@
|
|||
|
||||
import BranchGraph from './branch_graph';
|
||||
|
||||
(function() {
|
||||
this.Network = (function() {
|
||||
function Network(opts) {
|
||||
var vph;
|
||||
$("#filter_ref").click(function() {
|
||||
return $(this).closest('form').submit();
|
||||
});
|
||||
this.branch_graph = new BranchGraph($(".network-graph"), opts);
|
||||
vph = $(window).height() - 250;
|
||||
$('.network-graph').css({
|
||||
'height': vph + 'px'
|
||||
});
|
||||
}
|
||||
export default (function() {
|
||||
function Network(opts) {
|
||||
var vph;
|
||||
$("#filter_ref").click(function() {
|
||||
return $(this).closest('form').submit();
|
||||
});
|
||||
this.branch_graph = new BranchGraph($(".network-graph"), opts);
|
||||
vph = $(window).height() - 250;
|
||||
$('.network-graph').css({
|
||||
'height': vph + 'px'
|
||||
});
|
||||
}
|
||||
|
||||
return Network;
|
||||
})();
|
||||
}).call(window);
|
||||
return Network;
|
||||
})();
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
/* eslint-disable func-names, space-before-function-paren, prefer-arrow-callback, quotes, no-var, vars-on-top, camelcase, comma-dangle, consistent-return, max-len */
|
||||
/* global Network */
|
||||
/* global ShortcutsNetwork */
|
||||
|
||||
require('./network');
|
||||
import Network from './network';
|
||||
|
||||
(function() {
|
||||
$(function() {
|
||||
|
|
Loading…
Reference in a new issue