Skip to content

Commit

Permalink
Merge pull request #1553 from adumesny/develop
Browse files Browse the repository at this point in the history
rev 3.1.3
  • Loading branch information
adumesny authored Jan 3, 2021
2 parents 3bcf007 + aa41fc2 commit efcda59
Show file tree
Hide file tree
Showing 24 changed files with 30 additions and 32 deletions.
5 changes: 3 additions & 2 deletions doc/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Change log
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*

- [3.1.2-dev](#312-dev)
- [3.1.3](#313)
- [3.1.2 (2020-12-7)](#312-2020-12-7)
- [3.1.0 (2020-12-4)](#310-2020-12-4)
- [3.0.0 (2020-11-29)](#300-2020-11-29)
Expand Down Expand Up @@ -43,12 +43,13 @@ Change log
- [v0.1.0 (2014-11-18)](#v010-2014-11-18)

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

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

## 3.1.2 (2020-12-7)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gridstack",
"version": "3.1.2-dev",
"version": "3.1.3",
"description": "TypeScript/Javascript lib for dashboard layout and creation, no external dependencies, with many wrappers (React, Angular, Ember, knockout...)",
"main": "./dist/gridstack.js",
"types": "./dist/gridstack.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion spec/utils-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ describe('gridstack utils', function() {
expect(el.style.position).toEqual('');

// bogus test
expect(Utils.getScrollParent(el)).toEqual(null);
expect(Utils.getScrollParent(el)).not.toBe(null);
// bogus test
Utils.updateScrollPosition(el, {top: 20}, 10);
});
Expand Down
2 changes: 1 addition & 1 deletion src/gridstack-dd.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// gridstack-GridStackDD.get().ts 3.1.2-dev @preserve
// gridstack-GridStackDD.get().ts 3.1.3 @preserve

/**
* https://gridstackjs.com/
Expand Down
2 changes: 1 addition & 1 deletion src/gridstack-ddi.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// gridstack-ddi.ts 3.1.2-dev @preserve
// gridstack-ddi.ts 3.1.3 @preserve

/**
* https://gridstackjs.com/
Expand Down
2 changes: 1 addition & 1 deletion src/gridstack-engine.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// gridstack-engine.ts 3.1.2-dev @preserve
// gridstack-engine.ts 3.1.3 @preserve

/**
* https://gridstackjs.com/
Expand Down
2 changes: 1 addition & 1 deletion src/gridstack-extra.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* gridstack 3.1.2-dev extra CSS for [2-11] columns (non default)
* gridstack 3.1.3 extra CSS for [2-11] columns (non default)
* https://gridstackjs.com/
* (c) 2014-2020 Alain Dumesny, Dylan Weiss, Pavel Reznikov
* gridstack.js may be freely distributed under the MIT license.
Expand Down
2 changes: 1 addition & 1 deletion src/gridstack.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* 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
* 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
* https://gridstackjs.com/
* (c) 2014-2020 Alain Dumesny, Dylan Weiss, Pavel Reznikov
* gridstack.js may be freely distributed under the MIT license.
Expand Down
2 changes: 1 addition & 1 deletion src/gridstack.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// gridstack.ts 3.1.2-dev @preserve
// gridstack.ts 3.1.3 @preserve

/**
* https://gridstackjs.com/
Expand Down
2 changes: 1 addition & 1 deletion src/h5/dd-base-impl.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// dd-base-impl.ts 3.1.2-dev @preserve
// dd-base-impl.ts 3.1.3 @preserve

/**
* https://gridstackjs.com/
Expand Down
2 changes: 1 addition & 1 deletion src/h5/dd-draggable.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// dd-draggable.ts 3.1.2-dev @preserve
// dd-draggable.ts 3.1.3 @preserve

/**
* https://gridstackjs.com/
Expand Down
2 changes: 1 addition & 1 deletion src/h5/dd-droppable.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// dd-droppable.ts 3.1.2-dev @preserve
// dd-droppable.ts 3.1.3 @preserve

/**
* https://gridstackjs.com/
Expand Down
2 changes: 1 addition & 1 deletion src/h5/dd-element.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// dd-elements.ts 3.1.2-dev @preserve
// dd-elements.ts 3.1.3 @preserve

/**
* https://gridstackjs.com/
Expand Down
2 changes: 1 addition & 1 deletion src/h5/dd-manager.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// dd-manager.ts 3.1.2-dev @preserve
// dd-manager.ts 3.1.3 @preserve

/**
* https://gridstackjs.com/
Expand Down
2 changes: 1 addition & 1 deletion src/h5/dd-resizable-handle.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// dd-resizable-handle.ts 3.1.2-dev @preserve
// dd-resizable-handle.ts 3.1.3 @preserve

/**
* https://gridstackjs.com/
Expand Down
2 changes: 1 addition & 1 deletion src/h5/dd-resizable.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// dd-resizable.ts 3.1.2-dev @preserve
// dd-resizable.ts 3.1.3 @preserve

/**
* https://gridstackjs.com/
Expand Down
2 changes: 1 addition & 1 deletion src/h5/dd-utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// dd-utils.ts 3.1.2-dev @preserve
// dd-utils.ts 3.1.3 @preserve

/**
* https://gridstackjs.com/
Expand Down
2 changes: 1 addition & 1 deletion src/h5/gridstack-dd-native.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// gridstack-dd-native.ts 3.1.2-dev @preserve
// gridstack-dd-native.ts 3.1.3 @preserve

/**
* https://gridstackjs.com/
Expand Down
2 changes: 1 addition & 1 deletion src/index-h5.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// index.html5.ts 3.1.2-dev - everything you need for a Grid that uses HTML5 native drag&drop (work in progress) @preserve
// index.html5.ts 3.1.3 - everything you need for a Grid that uses HTML5 native drag&drop (work in progress) @preserve

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

Expand Down
2 changes: 1 addition & 1 deletion src/index-jq.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// index.jq.ts 3.1.2-dev - everything you need for a Grid that uses Jquery-ui drag&drop (original, full feature) @preserve
// index.jq.ts 3.1.3 - everything you need for a Grid that uses Jquery-ui drag&drop (original, full feature) @preserve

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

Expand Down
2 changes: 1 addition & 1 deletion src/index-static.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// index.static.ts 3.1.2-dev - everything you need for a static Grid (non draggable) @preserve
// index.static.ts 3.1.3 - everything you need for a static Grid (non draggable) @preserve

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

Expand Down
2 changes: 1 addition & 1 deletion src/jq/gridstack-dd-jqueryui.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// gridstack-dd-jqueryui.ts 3.1.2-dev @preserve
// gridstack-dd-jqueryui.ts 3.1.3 @preserve

/** JQuery UI Drag&Drop plugin
* https://gridstackjs.com/
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// types.ts 3.1.2-dev @preserve
// types.ts 3.1.3 @preserve

/**
* https://gridstackjs.com/
Expand Down
13 changes: 5 additions & 8 deletions src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// utils.ts 3.1.2-dev @preserve
// utils.ts 3.1.3 @preserve

/**
* https://gridstackjs.com/
Expand Down Expand Up @@ -328,14 +328,12 @@ export class Utils {
}
}

/**
* @internal
*
* Function used to scroll the page.
*
/**
* @internal Function used to scroll the page.
*
* @param event `MouseEvent` that triggers the resize
* @param el `HTMLElement` that's being resized
* @param distance Distance to scroll
* @param distance Distance from the V edges to start scrolling
*/
static updateScrollResize(event: MouseEvent, el: HTMLElement, distance: number): void {
const scrollEl = this.getScrollParent(el);
Expand All @@ -348,7 +346,6 @@ export class Utils {
// This also can be done with a timeout to keep scrolling while the mouse is
// in the scrolling zone. (will have smoother behavior)
scrollEl.scrollBy({ behavior: 'smooth', top: event.clientY - distance});

} else if (bottom) {
scrollEl.scrollBy({ behavior: 'smooth', top: distance - (height - event.clientY)});
}
Expand Down

0 comments on commit efcda59

Please sign in to comment.