Skip to content

Commit 8539e29

Browse files
committed
fix minor bug in resizing
1 parent b9e1d9d commit 8539e29

8 files changed

+111
-89
lines changed

js/dom/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const showFirstAlgorithm = require('./show_first_algorithm');
88
const showRequestedAlgorithm = require('./show_requested_algorithm');
99
const showWiki = require('./show_wiki');
1010
const enableSearch = require('./enable_search');
11+
const resizeWorkspace = require('./resize_workspace');
1112

1213
module.exports = {
1314
showAlgorithm,
@@ -17,5 +18,6 @@ module.exports = {
1718
showFirstAlgorithm,
1819
showRequestedAlgorithm,
1920
showWiki,
20-
enableSearch
21+
enableSearch,
22+
resizeWorkspace
2123
};

js/dom/resize_workspace.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
'use strict';
2+
3+
const app = require('../app');
4+
5+
module.exports = () => {
6+
app.getTracerManager().resize();
7+
app.getEditor().resize();
8+
$('.files_bar > .wrapper').scroll();
9+
};

js/dom/setup/setup_dividers.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict';
22

33
const app = require('../../app');
4+
const resizeWorkspace = require('../resize_workspace');
45

56
const addDividerToDom = (divider) => {
67
const [vertical, $first, $second] = divider;
@@ -38,9 +39,7 @@ const addDividerToDom = (divider) => {
3839
$first.css('right', (100 - percent) + '%');
3940
$second.css('left', percent + '%');
4041
x = pageX;
41-
app.getTracerManager().resize();
42-
app.getEditor().resize();
43-
$('.files_bar > .wrapper').scroll();
42+
resizeWorkspace();
4443
}
4544
});
4645

@@ -76,8 +75,7 @@ const addDividerToDom = (divider) => {
7675
$first.css('bottom', (100 - percent) + '%');
7776
$second.css('top', percent + '%');
7877
y = pageY;
79-
app.getTracerManager().resize();
80-
app.getEditor().resize();
78+
resizeWorkspace();
8179
}
8280
});
8381

js/dom/setup/setup_side_menu.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
const app = require('../../app');
44
const Server = require('../../server');
55
const showAlgorithm = require('../show_algorithm');
6+
const resizeWorkspace = require('../resize_workspace');
67

78
let sidemenu_percent;
89

@@ -24,14 +25,14 @@ module.exports = () => {
2425
$workspace.css('left', 0);
2526
}
2627

27-
app.getTracerManager().resize();
28+
resizeWorkspace();
2829
});
2930

3031
$('#documentation').click(function () {
3132
$('#btn_doc').click();
3233
});
3334

34-
$('#powered-by').click(function() {
35+
$('#powered-by').click(function () {
3536
$(this).toggleClass('open')
3637
$('#powered-by-list').toggle(300);
3738
});

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy