Skip to content

Commit fea2dbb

Browse files
committed
set resizer in vertical layout to correct width
1 parent 5b47746 commit fea2dbb

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

scripts/app/mixins/resizable.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ define(['jquery'], function($) {
4141
function setPosition(pos) {
4242
var toLeft = bg.settings.get('thickFrameBorders') ? 5 : 1;
4343
if (this.layout == 'vertical') {
44+
this.resizer.style.width = this.$el.width() + 'px';
4445
this.resizer.style.left = this.el.offsetLeft + 'px';
4546
this.resizer.style.top = pos - Math.round(resizeWidth / 2) - toLeft + 'px';
4647
} else {
@@ -94,7 +95,8 @@ define(['jquery'], function($) {
9495
}
9596

9697
if (layout == 'vertical') {
97-
this.resizer.style.width = '100%';
98+
//this.resizer.style.width = '100%';
99+
this.resizer.style.width = this.$el.width() + 'px';
98100
this.resizer.style.cursor = 'n-resize';
99101
this.resizer.style.height = resizeWidth + 'px';
100102
} else {
@@ -118,6 +120,9 @@ define(['jquery'], function($) {
118120
document.addEventListener('mouseup', function(e) {
119121
handleMouseUp.call(that, e);
120122
});
123+
window.addEventListener('resize', function(e) {
124+
resetPositions.call(that, e);
125+
});
121126

122127
document.body.appendChild(this.resizer);
123128
},

0 commit comments

Comments
 (0)