Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More

angular-gridster2

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-gridster2 - npm Package Compare versions

Comparing version 3.8.0 to 3.8.1

@@ -27,2 +27,3 @@ import { OnInit, ElementRef, OnDestroy, Renderer2 } from '@angular/core';

gridLines: GridsterGridComponent;
dragInProgress: boolean;
static checkCollisionTwoItems(item: GridsterItem, item2: GridsterItem): boolean;

@@ -29,0 +30,0 @@ constructor(el: ElementRef, renderer: Renderer2);

@@ -17,2 +17,3 @@ "use strict";

this.curRowHeight = 0;
this.dragInProgress = false;
this.$options.draggable.stop = undefined;

@@ -19,0 +20,0 @@ this.$options.draggable.start = undefined;

@@ -78,3 +78,4 @@ "use strict";

this.swap = new gridsterSwap_service_1.GridsterSwap(this.gridsterItem, this.gridster);
this.gridster.gridLines.updateGrid(true);
this.gridster.dragInProgress = true;
this.gridster.gridLines.updateGrid();
this.path.push({ x: this.gridsterItem.item.x, y: this.gridsterItem.item.y });

@@ -92,2 +93,3 @@ };

this.lastMouse.pageY = e.pageY;
this.gridster.gridLines.updateGrid();
};

@@ -109,3 +111,4 @@ GridsterDraggable.prototype.calculateItemPositionFromMousePosition = function (e) {

this.gridsterItem.renderer.removeClass(this.gridsterItem.el, 'gridster-item-moving');
this.gridster.gridLines.updateGrid(false);
this.gridster.dragInProgress = false;
this.gridster.gridLines.updateGrid();
this.path = [];

@@ -112,0 +115,0 @@ if (this.gridster.$options.draggable.stop) {

@@ -1,5 +0,6 @@

import { ElementRef, Renderer2 } from '@angular/core';
import { ChangeDetectorRef, ElementRef, Renderer2 } from '@angular/core';
import { GridsterComponent } from './gridster.component';
export declare class GridsterGridComponent {
renderer: Renderer2;
private cdRef;
el: any;

@@ -14,4 +15,4 @@ gridster: GridsterComponent;

rowsWidth: number;
constructor(el: ElementRef, gridster: GridsterComponent, renderer: Renderer2);
updateGrid(dragOn?: boolean): void;
constructor(el: ElementRef, gridster: GridsterComponent, renderer: Renderer2, cdRef: ChangeDetectorRef);
updateGrid(): void;
}

@@ -6,4 +6,5 @@ "use strict";

var GridsterGridComponent = (function () {
function GridsterGridComponent(el, gridster, renderer) {
function GridsterGridComponent(el, gridster, renderer, cdRef) {
this.renderer = renderer;
this.cdRef = cdRef;
this.el = el.nativeElement;

@@ -19,13 +20,13 @@ this.gridster = gridster;

}
GridsterGridComponent.prototype.updateGrid = function (dragOn) {
GridsterGridComponent.prototype.updateGrid = function () {
if (this.gridster.$options.displayGrid === 'always' && !this.gridster.mobile) {
this.renderer.setStyle(this.el, 'display', 'block');
}
else if (this.gridster.$options.displayGrid === 'onDrag&Resize' && dragOn) {
else if (this.gridster.$options.displayGrid === 'onDrag&Resize' && this.gridster.dragInProgress) {
this.renderer.setStyle(this.el, 'display', 'block');
}
else if (this.gridster.$options.displayGrid === 'none' || !dragOn || this.gridster.mobile) {
else if (this.gridster.$options.displayGrid === 'none' || !this.gridster.dragInProgress || this.gridster.mobile) {
this.renderer.setStyle(this.el, 'display', 'none');
return;
}
this.gridster.setGridDimensions();
this.margin = this.gridster.$options.margin;

@@ -38,2 +39,3 @@ this.height = this.gridster.curRowHeight - this.margin;

this.rowsWidth = this.gridster.curColWidth * this.columns.length;
this.cdRef.detectChanges();
};

@@ -44,3 +46,4 @@ GridsterGridComponent.decorators = [

template: "<div class=\"columns\" [style.height.px]=\"columnsHeight\"> <div class=\"column\" *ngFor=\"let column of columns\" [style.min-width.px]=\"width\" [style.margin-left.px]=\"margin\"></div> </div> <div class=\"rows\" [style.width.px]=\"rowsWidth\"> <div class=\"row\" *ngFor=\"let row of rows\" [style.height.px]=\"height\" [style.margin-top.px]=\"margin\"></div> </div>",
styles: [":host { display: none; position: absolute; } .rows, .columns { position: absolute; } .columns { display: flex; flex-direction: row; } .column, .row { transition: .3s; box-sizing: border-box; } .column { height: 100%; border-left: 1px solid white; border-right: 1px solid white; } .row { width: 100%; border-top: 1px solid white; border-bottom: 1px solid white; }"]
styles: [":host { display: none; position: absolute; } .rows, .columns { position: absolute; } .columns { display: flex; flex-direction: row; } .column, .row { transition: .3s; box-sizing: border-box; } .column { height: 100%; border-left: 1px solid white; border-right: 1px solid white; } .row { width: 100%; border-top: 1px solid white; border-bottom: 1px solid white; }"],
changeDetection: core_1.ChangeDetectionStrategy.OnPush
},] },

@@ -53,2 +56,3 @@ ];

{ type: core_1.Renderer2, },
{ type: core_1.ChangeDetectorRef, },
]; };

@@ -55,0 +59,0 @@ return GridsterGridComponent;

@@ -1,1 +0,1 @@

[{"__symbolic":"module","version":3,"metadata":{"GridsterGridComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"gridster-grid","template":"<div class=\"columns\" [style.height.px]=\"columnsHeight\"> <div class=\"column\" *ngFor=\"let column of columns\" [style.min-width.px]=\"width\" [style.margin-left.px]=\"margin\"></div> </div> <div class=\"rows\" [style.width.px]=\"rowsWidth\"> <div class=\"row\" *ngFor=\"let row of rows\" [style.height.px]=\"height\" [style.margin-top.px]=\"margin\"></div> </div>","styles":[":host { display: none; position: absolute; } .rows, .columns { position: absolute; } .columns { display: flex; flex-direction: row; } .column, .row { transition: .3s; box-sizing: border-box; } .column { height: 100%; border-left: 1px solid white; border-right: 1px solid white; } .row { width: 100%; border-top: 1px solid white; border-bottom: 1px solid white; }"]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Host"}}],null],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"./gridster.component","name":"GridsterComponent"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2"}]}],"updateGrid":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"GridsterGridComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"gridster-grid","template":"<div class=\"columns\" [style.height.px]=\"columnsHeight\"> <div class=\"column\" *ngFor=\"let column of columns\" [style.min-width.px]=\"width\" [style.margin-left.px]=\"margin\"></div> </div> <div class=\"rows\" [style.width.px]=\"rowsWidth\"> <div class=\"row\" *ngFor=\"let row of rows\" [style.height.px]=\"height\" [style.margin-top.px]=\"margin\"></div> </div>","styles":[":host { display: none; position: absolute; } .rows, .columns { position: absolute; } .columns { display: flex; flex-direction: row; } .column, .row { transition: .3s; box-sizing: border-box; } .column { height: 100%; border-left: 1px solid white; border-right: 1px solid white; } .row { width: 100%; border-top: 1px solid white; border-bottom: 1px solid white; }"]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Host"}}],null],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"./gridster.component","name":"GridsterComponent"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2"}]}],"updateGrid":[{"__symbolic":"method"}]}}}}]
[{"__symbolic":"module","version":3,"metadata":{"GridsterGridComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"gridster-grid","template":"<div class=\"columns\" [style.height.px]=\"columnsHeight\"> <div class=\"column\" *ngFor=\"let column of columns\" [style.min-width.px]=\"width\" [style.margin-left.px]=\"margin\"></div> </div> <div class=\"rows\" [style.width.px]=\"rowsWidth\"> <div class=\"row\" *ngFor=\"let row of rows\" [style.height.px]=\"height\" [style.margin-top.px]=\"margin\"></div> </div>","styles":[":host { display: none; position: absolute; } .rows, .columns { position: absolute; } .columns { display: flex; flex-direction: row; } .column, .row { transition: .3s; box-sizing: border-box; } .column { height: 100%; border-left: 1px solid white; border-right: 1px solid white; } .row { width: 100%; border-top: 1px solid white; border-bottom: 1px solid white; }"],"changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy"},"member":"OnPush"}}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Host"}}],null,null],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"./gridster.component","name":"GridsterComponent"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef"}]}],"updateGrid":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"GridsterGridComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component"},"arguments":[{"selector":"gridster-grid","template":"<div class=\"columns\" [style.height.px]=\"columnsHeight\"> <div class=\"column\" *ngFor=\"let column of columns\" [style.min-width.px]=\"width\" [style.margin-left.px]=\"margin\"></div> </div> <div class=\"rows\" [style.width.px]=\"rowsWidth\"> <div class=\"row\" *ngFor=\"let row of rows\" [style.height.px]=\"height\" [style.margin-top.px]=\"margin\"></div> </div>","styles":[":host { display: none; position: absolute; } .rows, .columns { position: absolute; } .columns { display: flex; flex-direction: row; } .column, .row { transition: .3s; box-sizing: border-box; } .column { height: 100%; border-left: 1px solid white; border-right: 1px solid white; } .row { width: 100%; border-top: 1px solid white; border-bottom: 1px solid white; }"],"changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy"},"member":"OnPush"}}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Host"}}],null,null],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"./gridster.component","name":"GridsterComponent"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer2"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef"}]}],"updateGrid":[{"__symbolic":"method"}]}}}}]

@@ -66,3 +66,4 @@ "use strict";

this.push = new gridsterPush_service_1.GridsterPush(this.gridsterItem, this.gridster);
this.gridster.gridLines.updateGrid(true);
this.gridster.dragInProgress = true;
this.gridster.gridLines.updateGrid();
if (e.currentTarget.classList.contains('handle-n')) {

@@ -115,2 +116,3 @@ this.resizeEventScrollType.n = true;

this.lastMouse.pageY = e.pageY;
this.gridster.gridLines.updateGrid();
};

@@ -127,3 +129,4 @@ GridsterResizable.prototype.dragStop = function (e) {

this.gridsterItem.renderer.removeClass(this.gridsterItem.el, 'gridster-item-resizing');
this.gridster.gridLines.updateGrid(false);
this.gridster.dragInProgress = false;
this.gridster.gridLines.updateGrid();
if (this.gridster.$options.resizable.stop) {

@@ -130,0 +133,0 @@ Promise.resolve(this.gridster.$options.resizable.stop(this.gridsterItem.item, this.gridsterItem, e))

{
"name": "angular-gridster2",
"version": "3.8.0",
"version": "3.8.1",
"license": "MIT",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet