Skip to content

Commit b6d8c72

Browse files
committed
update left resize option
1 parent 388c83f commit b6d8c72

File tree

11 files changed

+45
-16
lines changed

11 files changed

+45
-16
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ insert body
119119
|rows|{object}|schedule data|
120120
|draggable|{boolean}|enable draggable(default true)|
121121
|resizable|{boolean}|enable resizable(default true)|
122+
|resizableLeft|{boolean}|enable left handle resizable(default false)|
122123

123124
### Schedule Data
124125

demo/index.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,11 @@ <h2 id="option">Option</h2>
199199
<td>Boolean</td>
200200
<td>enable resizable</td>
201201
</tr>
202+
<tr>
203+
<td colspan="2">resizableLeft</td>
204+
<td>Boolean</td>
205+
<td>enable left handle resizable(default false)</td>
206+
</tr>
202207
<tr>
203208
<td rowspan="3">rows</td>
204209
<td></td>
@@ -336,6 +341,7 @@ <h2 id="data">Schedule Data</h2>
336341
bundleMoveWidth: 6, // width to move all schedules to the right of the clicked time line cell
337342
draggable: isDraggable,
338343
resizable: isResizable,
344+
resizableLeft: true,
339345
rows : {
340346
'0' : {
341347
title : 'Title Area1',

dist/css/style.css

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,20 +74,19 @@
7474
color: #fff;
7575
background: #4f93d6;
7676
cursor: pointer;
77-
z-index: 10;
78-
overflow: hidden; }
77+
z-index: 10; }
7978
.jq-schedule .sc_bar .head {
8079
display: block;
8180
margin-top: 6px;
82-
padding: 0 8px 0;
8381
font-size: 12px;
82+
padding: 0 14px;
8483
height: 1.2em;
8584
overflow: hidden; }
8685
.jq-schedule .sc_bar .text {
8786
display: block;
8887
margin-top: 6px;
89-
padding: 0 16px 0;
9088
font-weight: bold;
89+
padding: 0 14px;
9190
height: 1.2em;
9291
overflow: hidden; }
9392
.jq-schedule .sc_bar .ui-resizable-handle {
@@ -97,8 +96,12 @@
9796
height: 100%;
9897
right: 0;
9998
top: 0;
100-
width: 10px;
99+
width: 5px;
101100
background: #2e7ac4; }
101+
.jq-schedule .sc_bar .ui-resizable-handle.ui-resizable-e {
102+
right: 0; }
103+
.jq-schedule .sc_bar .ui-resizable-handle.ui-resizable-w {
104+
left: 0; }
102105

103106
.jq-schedule .timeline,
104107
.jq-schedule .sc_main .tb {

dist/css/style.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/jq.schedule.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,8 +499,14 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
499499
}
500500
}
501501
});
502+
var resizableHandles = ['e'];
503+
504+
if (setting.resizableLeft) {
505+
resizableHandles.push('w');
506+
}
507+
502508
$node.resizable({
503-
handles: 'e',
509+
handles: resizableHandles.join(','),
504510
grid: [setting.widthTimeX, setting.timeLineY - setting.timeBorder],
505511
minWidth: setting.widthTimeX,
506512
containment: $this.find('.sc_main_scroll'),
@@ -928,6 +934,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
928934
// width to move all schedules to the right of the clicked time cell
929935
draggable: true,
930936
resizable: true,
937+
resizableLeft: false,
931938
// event
932939
onInitRow: null,
933940
onChange: null,

0 commit comments

Comments
 (0)