Skip to content

Commit 6872fa2

Browse files
authored
Max initial width (#8)
* Initial commit * Max Width Hint
1 parent 49d9153 commit 6872fa2

25 files changed

+247
-126
lines changed

README.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Simple JavaScript resizable table columns
2-
Insipired by **[jquery-resizable-columns](https://github.com/dobtco/jquery-resizable-columns)**
2+
Inspired by **[jquery-resizable-columns](https://github.com/dobtco/jquery-resizable-columns)**
33
## This is still a work in progress
44

55
## Usage
@@ -21,25 +21,28 @@ new ResizableTableColumns(tableElement, {
2121
```js
2222
var options = {
2323
// boolean - The resize handle will span the entire height of the table
24-
resizeFromBody: true;
24+
resizeFromBody: true,
2525

2626
// null or number - The minimum width any column in the table should have
27-
minWidth: 40;
27+
minWidth: 40,
2828

2929
// null or number - The maximum width any column in the table should have
30-
maxWidth: null;
30+
maxWidth: null,
3131

3232
// boolean - Should the minimum width take into account CSS rules?
33-
obeyCssMinWidth: false;
33+
obeyCssMinWidth: false,
3434

3535
// boolean - Should the maximum width take into account CSS rules?
36-
obeyCssMaxWidth: false;
36+
obeyCssMaxWidth: false,
3737

3838
// number - The maximum number off milliseconds between to pointer down events to consider the action a 'double click'
39-
doubleClickDelay: 500;
39+
doubleClickDelay: 500,
4040

41-
//data store provider (ex: https://github.com/marcuswestin/store.js)
42-
store: null;
41+
// data store provider (ex: https://github.com/marcuswestin/store.js)
42+
store: null,
43+
44+
// null or number - The suggestion for how wide (in pixels) a cell might be in case the content is really wide.
45+
maxInitialWidthHint: null
4346
}
4447
```
4548

dist/css/resizable-table-columns.css

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@
5858

5959
.rtc-wrapper .rtc-handle-container .rtc-handle {
6060
position: absolute;
61-
width: 9px;
62-
margin-left: -4.95px;
61+
width: 6.5px;
62+
margin-left: -3.575px;
6363
z-index: 2;
6464
cursor: col-resize;
6565
}
6666

6767
.rtc-wrapper .rtc-handle-container .rtc-handle:last-of-type {
68-
width: 6px;
69-
margin-left: -6.6px;
68+
width: 4.5px;
69+
margin-left: -4.95px;
7070
}

dist/css/resizable-table-columns.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.

0 commit comments

Comments
 (0)