Skip to content

Commit 60e583f

Browse files
committed
Upgrade to 0.6.8
version upgrade and code cleaning
1 parent 7a194c8 commit 60e583f

File tree

8 files changed

+23
-9
lines changed

8 files changed

+23
-9
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
<a name="0.6.8"></a>
2+
# [0.6.8]((https://github.com/swiety85/angular2gridster/compare/0.6.7...0.6.8)) (2017-10-16)
3+
4+
5+
### Bug Fixes
6+
7+
* **drag:** Fix problem with scrolling on touch devices. Issue #111
8+
* **drag** Fix drag position bug in scrolled container. Issue #114
9+
10+
### Features
11+
12+
* **drag** Options: direction: "none" and floating: false. Issue #109
13+
* **performance** Disable initial animation. Issue #104
14+
* **config** Provide option to set fixed cellWidth/cellHeight. Issue #91
15+
16+
117
<a name="0.6.7"></a>
218
# [0.6.7]((https://github.com/swiety85/angular2gridster/compare/0.6.6...0.6.7)) (2017-09-25)
319

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ System.config({
7373
widgets: Array<any> = [...];
7474
gridsterOptions = {
7575
lanes: 2, // how many lines (grid cells) dashboard has
76-
direction: 'vertical', // items floating direction: vertical/horizontal
76+
direction: 'vertical', // items floating direction: vertical/horizontal/none
77+
floating: false, // default=true - prevents items to float according to the direction (gravity)
7778
dragAndDrop: false, // possible to change items position by drag n drop
7879
resizable: false, // possible to resize items by drag n drop by item edge/corner
7980
useCSSTransforms: true, // Uses CSS3 translate() instead of position top/left - significant performance boost.

demo/src/app/app.component.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
display: flex;
44
display: -webkit-inline-box;
55
flex-direction: column;
6-
height: 100%;
6+
height: calc(100% - 20px);
77
width: calc(100% - 40px);
88
padding: 10px 20px;
99
overflow: auto;

demo/src/app/gridster/gridster-item/gridster-item.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,8 +439,7 @@ export class GridsterItemComponent implements OnInit, OnChanges, AfterViewInit,
439439

440440
const dragSub = draggable.dragMove
441441
.subscribe((event: DraggableEvent) => {
442-
const scrollData = this.gridster.gridsterScrollData;
443-
console.log(event.clientY, cursorToElementPosition.y, scrollData.scrollTop, this.gridster.gridsterRect.top);
442+
444443
this.positionY = (event.clientY - cursorToElementPosition.y -
445444
this.gridster.gridsterRect.top);
446445
this.positionX = (event.clientX - cursorToElementPosition.x -

demo/src/app/gridster/gridster.service.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,6 @@ export class GridsterService {
363363
// right to allow dragging items to the end of the grid.
364364
if (this.options.direction === 'horizontal') {
365365
const increaseWidthWith = (increaseGridsterSize) ? this.maxItemWidth : 0;
366-
//child.style.height = (this.options.lanes * this.cellHeight) + 'px';
367366
child.style.height = '';
368367
child.style.width = ((this.gridList.grid.length + increaseWidthWith) * this.cellWidth) + 'px';
369368

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular2gridster",
3-
"version": "0.6.7",
3+
"version": "0.6.8",
44
"license": "MIT",
55
"main": "./dist/index.js",
66
"scripts": {

src/gridster-item/gridster-item.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,8 +439,7 @@ export class GridsterItemComponent implements OnInit, OnChanges, AfterViewInit,
439439

440440
const dragSub = draggable.dragMove
441441
.subscribe((event: DraggableEvent) => {
442-
const scrollData = this.gridster.gridsterScrollData;
443-
console.log(event.clientY, cursorToElementPosition.y, scrollData.scrollTop, this.gridster.gridsterRect.top);
442+
444443
this.positionY = (event.clientY - cursorToElementPosition.y -
445444
this.gridster.gridsterRect.top);
446445
this.positionX = (event.clientX - cursorToElementPosition.x -

src/gridster.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ export class GridsterService {
363363
// right to allow dragging items to the end of the grid.
364364
if (this.options.direction === 'horizontal') {
365365
const increaseWidthWith = (increaseGridsterSize) ? this.maxItemWidth : 0;
366-
//child.style.height = (this.options.lanes * this.cellHeight) + 'px';
366+
367367
child.style.height = '';
368368
child.style.width = ((this.gridList.grid.length + increaseWidthWith) * this.cellWidth) + 'px';
369369

0 commit comments

Comments
 (0)