Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit efcda59

Browse files
authored
Merge pull request gridstack#1553 from adumesny/develop
rev 3.1.3
2 parents 3bcf007 + aa41fc2 commit efcda59

24 files changed

+30
-32
lines changed

doc/CHANGES.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Change log
55
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
66
**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*
77

8-
- [3.1.2-dev](#312-dev)
8+
- [3.1.3](#313)
99
- [3.1.2 (2020-12-7)](#312-2020-12-7)
1010
- [3.1.0 (2020-12-4)](#310-2020-12-4)
1111
- [3.0.0 (2020-11-29)](#300-2020-11-29)
@@ -43,12 +43,13 @@ Change log
4343
- [v0.1.0 (2014-11-18)](#v010-2014-11-18)
4444

4545
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
46-
## 3.1.2-dev
46+
## 3.1.3
4747

4848
- fix [1535](https://github.com/gridstack/gridstack.js/issues/1535) use batchUpdate() around grid init to make sure gs-y attributes are respected.
4949
- fix [1540](https://github.com/gridstack/gridstack.js/issues/1540) Safari H5 drag&drop fixed
5050
- fix [1545](https://github.com/gridstack/gridstack.js/issues/1545) `disableMove()` correctly prevents drag later (remove events and draggable attribute)
5151
- fix [1546](https://github.com/gridstack/gridstack.js/issues/1546) resize no longer delayed, which caused race conditions errors
52+
- fix [1001](https://github.com/gridstack/gridstack.js/issues/1001) resizing near bottom/top needs to auto-scroll/. thanks [@hbcarlos](https://github.com/hbcarlos)!
5253

5354
## 3.1.2 (2020-12-7)
5455

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gridstack",
3-
"version": "3.1.2-dev",
3+
"version": "3.1.3",
44
"description": "TypeScript/Javascript lib for dashboard layout and creation, no external dependencies, with many wrappers (React, Angular, Ember, knockout...)",
55
"main": "./dist/gridstack.js",
66
"types": "./dist/gridstack.d.ts",

spec/utils-spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ describe('gridstack utils', function() {
123123
expect(el.style.position).toEqual('');
124124

125125
// bogus test
126-
expect(Utils.getScrollParent(el)).toEqual(null);
126+
expect(Utils.getScrollParent(el)).not.toBe(null);
127127
// bogus test
128128
Utils.updateScrollPosition(el, {top: 20}, 10);
129129
});

src/gridstack-dd.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// gridstack-GridStackDD.get().ts 3.1.2-dev @preserve
1+
// gridstack-GridStackDD.get().ts 3.1.3 @preserve
22

33
/**
44
* https://gridstackjs.com/

src/gridstack-ddi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// gridstack-ddi.ts 3.1.2-dev @preserve
1+
// gridstack-ddi.ts 3.1.3 @preserve
22

33
/**
44
* https://gridstackjs.com/

src/gridstack-engine.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// gridstack-engine.ts 3.1.2-dev @preserve
1+
// gridstack-engine.ts 3.1.3 @preserve
22

33
/**
44
* https://gridstackjs.com/

src/gridstack-extra.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* gridstack 3.1.2-dev extra CSS for [2-11] columns (non default)
2+
* gridstack 3.1.3 extra CSS for [2-11] columns (non default)
33
* https://gridstackjs.com/
44
* (c) 2014-2020 Alain Dumesny, Dylan Weiss, Pavel Reznikov
55
* gridstack.js may be freely distributed under the MIT license.

src/gridstack.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* gridstack 3.1.2-dev required CSS for default 12 and 1 column Mode size. Use gridstack-extra.css for column [2-11], else see https://github.com/gridstack/gridstack.js#custom-columns-css
2+
* gridstack 3.1.3 required CSS for default 12 and 1 column Mode size. Use gridstack-extra.css for column [2-11], else see https://github.com/gridstack/gridstack.js#custom-columns-css
33
* https://gridstackjs.com/
44
* (c) 2014-2020 Alain Dumesny, Dylan Weiss, Pavel Reznikov
55
* gridstack.js may be freely distributed under the MIT license.

src/gridstack.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// gridstack.ts 3.1.2-dev @preserve
1+
// gridstack.ts 3.1.3 @preserve
22

33
/**
44
* https://gridstackjs.com/

src/h5/dd-base-impl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// dd-base-impl.ts 3.1.2-dev @preserve
1+
// dd-base-impl.ts 3.1.3 @preserve
22

33
/**
44
* https://gridstackjs.com/

src/h5/dd-draggable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// dd-draggable.ts 3.1.2-dev @preserve
1+
// dd-draggable.ts 3.1.3 @preserve
22

33
/**
44
* https://gridstackjs.com/

src/h5/dd-droppable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// dd-droppable.ts 3.1.2-dev @preserve
1+
// dd-droppable.ts 3.1.3 @preserve
22

33
/**
44
* https://gridstackjs.com/

src/h5/dd-element.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// dd-elements.ts 3.1.2-dev @preserve
1+
// dd-elements.ts 3.1.3 @preserve
22

33
/**
44
* https://gridstackjs.com/

src/h5/dd-manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// dd-manager.ts 3.1.2-dev @preserve
1+
// dd-manager.ts 3.1.3 @preserve
22

33
/**
44
* https://gridstackjs.com/

src/h5/dd-resizable-handle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// dd-resizable-handle.ts 3.1.2-dev @preserve
1+
// dd-resizable-handle.ts 3.1.3 @preserve
22

33
/**
44
* https://gridstackjs.com/

src/h5/dd-resizable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// dd-resizable.ts 3.1.2-dev @preserve
1+
// dd-resizable.ts 3.1.3 @preserve
22

33
/**
44
* https://gridstackjs.com/

src/h5/dd-utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// dd-utils.ts 3.1.2-dev @preserve
1+
// dd-utils.ts 3.1.3 @preserve
22

33
/**
44
* https://gridstackjs.com/

src/h5/gridstack-dd-native.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// gridstack-dd-native.ts 3.1.2-dev @preserve
1+
// gridstack-dd-native.ts 3.1.3 @preserve
22

33
/**
44
* https://gridstackjs.com/

src/index-h5.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// index.html5.ts 3.1.2-dev - everything you need for a Grid that uses HTML5 native drag&drop (work in progress) @preserve
1+
// index.html5.ts 3.1.3 - everything you need for a Grid that uses HTML5 native drag&drop (work in progress) @preserve
22

33
// import './gridstack-poly.js';
44

src/index-jq.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// index.jq.ts 3.1.2-dev - everything you need for a Grid that uses Jquery-ui drag&drop (original, full feature) @preserve
1+
// index.jq.ts 3.1.3 - everything you need for a Grid that uses Jquery-ui drag&drop (original, full feature) @preserve
22

33
// import './gridstack-poly.js';
44

src/index-static.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// index.static.ts 3.1.2-dev - everything you need for a static Grid (non draggable) @preserve
1+
// index.static.ts 3.1.3 - everything you need for a static Grid (non draggable) @preserve
22

33
// import './gridstack-poly.js';
44

src/jq/gridstack-dd-jqueryui.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// gridstack-dd-jqueryui.ts 3.1.2-dev @preserve
1+
// gridstack-dd-jqueryui.ts 3.1.3 @preserve
22

33
/** JQuery UI Drag&Drop plugin
44
* https://gridstackjs.com/

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// types.ts 3.1.2-dev @preserve
1+
// types.ts 3.1.3 @preserve
22

33
/**
44
* https://gridstackjs.com/

src/utils.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// utils.ts 3.1.2-dev @preserve
1+
// utils.ts 3.1.3 @preserve
22

33
/**
44
* https://gridstackjs.com/
@@ -328,14 +328,12 @@ export class Utils {
328328
}
329329
}
330330

331-
/**
332-
* @internal
333-
*
334-
* Function used to scroll the page.
335-
*
331+
/**
332+
* @internal Function used to scroll the page.
333+
*
336334
* @param event `MouseEvent` that triggers the resize
337335
* @param el `HTMLElement` that's being resized
338-
* @param distance Distance to scroll
336+
* @param distance Distance from the V edges to start scrolling
339337
*/
340338
static updateScrollResize(event: MouseEvent, el: HTMLElement, distance: number): void {
341339
const scrollEl = this.getScrollParent(el);
@@ -348,7 +346,6 @@ export class Utils {
348346
// This also can be done with a timeout to keep scrolling while the mouse is
349347
// in the scrolling zone. (will have smoother behavior)
350348
scrollEl.scrollBy({ behavior: 'smooth', top: event.clientY - distance});
351-
352349
} else if (bottom) {
353350
scrollEl.scrollBy({ behavior: 'smooth', top: distance - (height - event.clientY)});
354351
}

0 commit comments

Comments
 (0)