Skip to content

Commit 8723b3e

Browse files
committed
Adding overlay DIV while resizing
1 parent b715d4f commit 8723b3e

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

css/jquery.splitter.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,12 @@
4646
}
4747
.splitter_panel .right_panel {
4848
right: 0;
49+
}
50+
.splitterMask {
51+
position: absolute;
52+
left: 0;
53+
top: 0;
54+
right: 0;
55+
bottom: 0;
56+
z-index: 1000;
4957
}

js/jquery.splitter-0.12.0.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -224,21 +224,15 @@
224224
});
225225
});
226226
$(document.documentElement).bind('mousedown.splitter', function(e) {
227-
if (splitter_id !== null) {
227+
if (splitter_id !== null && e.which == 1) {
228228
current_splitter = splitters[splitter_id];
229-
$('<div class="splitterMask"></div>').insertAfter(current_splitter);
230-
if (current_splitter.orientation == 'horizontal') {
231-
$('body').css('cursor', 'row-resize');
232-
} else if (current_splitter.orientation == 'vertical') {
233-
$('body').css('cursor', 'col-resize');
234-
}
229+
$('<div class="splitterMask"></div>').css('cursor', splitter.css('cursor')).insertAfter(current_splitter);
235230
current_splitter.settings.onDragStart(e);
236231
return false;
237232
}
238233
}).bind('mouseup.splitter', function(e) {
239234
if (current_splitter) {
240235
$('.splitterMask').remove();
241-
$('body').css('cursor', 'auto');
242236
current_splitter.settings.onDragEnd(e);
243237
current_splitter = null;
244238
}

0 commit comments

Comments
 (0)