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

angular-gridster2

Package Overview
Dependencies
Maintainers
1
Versions
245
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-gridster2 - npm Package Compare versions

Comparing version 4.6.0 to 4.6.1

2

dist/gridster.interface.d.ts

@@ -26,3 +26,3 @@ import { GridsterConfigS } from './gridsterConfigS.interface';

movingItem: GridsterItemS | null;
previewStyle: () => void;
previewStyle: (drag?: boolean) => void;
mobile: boolean;

@@ -29,0 +29,0 @@ curWidth: number;

import { GridsterComponentInterface } from './gridster.interface';
import { GridsterItemComponentInterface } from './gridsterItemComponent.interface';
import { GridsterItemS } from './gridsterItemS.interface';
export declare class GridsterCompact {

@@ -8,6 +8,7 @@ private gridster;

checkCompact(): void;
checkCompactItem(item: GridsterItemS): void;
checkCompactUp(): void;
moveUpTillCollision(itemComponent: GridsterItemComponentInterface): boolean;
moveUpTillCollision(item: GridsterItemS): boolean;
checkCompactLeft(): void;
moveLeftTillCollision(itemComponent: GridsterItemComponentInterface): boolean;
moveLeftTillCollision(item: GridsterItemS): boolean;
}

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

var gridster_interface_1 = require("./gridster.interface");
var gridsterConfig_interface_1 = require("./gridsterConfig.interface");
var GridsterCompact = /** @class */ (function () {

@@ -14,14 +15,14 @@ function GridsterCompact(gridster) {

GridsterCompact.prototype.checkCompact = function () {
if (this.gridster.$options.compactType !== 'none') {
if (this.gridster.$options.compactType === 'compactUp') {
if (this.gridster.$options.compactType !== gridsterConfig_interface_1.CompactType.None) {
if (this.gridster.$options.compactType === gridsterConfig_interface_1.CompactType.CompactUp) {
this.checkCompactUp();
}
else if (this.gridster.$options.compactType === 'compactLeft') {
else if (this.gridster.$options.compactType === gridsterConfig_interface_1.CompactType.CompactLeft) {
this.checkCompactLeft();
}
else if (this.gridster.$options.compactType === 'compactUp&Left') {
else if (this.gridster.$options.compactType === gridsterConfig_interface_1.CompactType.CompactUpAndLeft) {
this.checkCompactUp();
this.checkCompactLeft();
}
else if (this.gridster.$options.compactType === 'compactLeft&Up') {
else if (this.gridster.$options.compactType === gridsterConfig_interface_1.CompactType.CompactLeftAndUp) {
this.checkCompactLeft();

@@ -32,2 +33,20 @@ this.checkCompactUp();

};
GridsterCompact.prototype.checkCompactItem = function (item) {
if (this.gridster.$options.compactType !== gridsterConfig_interface_1.CompactType.None) {
if (this.gridster.$options.compactType === gridsterConfig_interface_1.CompactType.CompactUp) {
this.moveUpTillCollision(item);
}
else if (this.gridster.$options.compactType === gridsterConfig_interface_1.CompactType.CompactLeft) {
this.moveLeftTillCollision(item);
}
else if (this.gridster.$options.compactType === gridsterConfig_interface_1.CompactType.CompactUpAndLeft) {
this.moveUpTillCollision(item);
this.moveLeftTillCollision(item);
}
else if (this.gridster.$options.compactType === gridsterConfig_interface_1.CompactType.CompactLeftAndUp) {
this.moveLeftTillCollision(item);
this.moveUpTillCollision(item);
}
}
};
GridsterCompact.prototype.checkCompactUp = function () {

@@ -41,3 +60,3 @@ var widgetMovedUp = false, widget, moved;

}
moved = this.moveUpTillCollision(widget);
moved = this.moveUpTillCollision(widget.$item);
if (moved) {

@@ -53,10 +72,10 @@ widgetMovedUp = true;

};
GridsterCompact.prototype.moveUpTillCollision = function (itemComponent) {
itemComponent.$item.y -= 1;
if (this.gridster.checkCollision(itemComponent.$item)) {
itemComponent.$item.y += 1;
GridsterCompact.prototype.moveUpTillCollision = function (item) {
item.y -= 1;
if (this.gridster.checkCollision(item)) {
item.y += 1;
return false;
}
else {
this.moveUpTillCollision(itemComponent);
this.moveUpTillCollision(item);
return true;

@@ -73,3 +92,3 @@ }

}
moved = this.moveLeftTillCollision(widget);
moved = this.moveLeftTillCollision(widget.$item);
if (moved) {

@@ -85,10 +104,10 @@ widgetMovedUp = true;

};
GridsterCompact.prototype.moveLeftTillCollision = function (itemComponent) {
itemComponent.$item.x -= 1;
if (this.gridster.checkCollision(itemComponent.$item)) {
itemComponent.$item.x += 1;
GridsterCompact.prototype.moveLeftTillCollision = function (item) {
item.x -= 1;
if (this.gridster.checkCollision(item)) {
item.x += 1;
return false;
}
else {
this.moveLeftTillCollision(itemComponent);
this.moveLeftTillCollision(item);
return true;

@@ -95,0 +114,0 @@ }

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

[{"__symbolic":"module","version":4,"metadata":{"GridsterCompact":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":5,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./gridster.interface","name":"GridsterComponentInterface","line":8,"character":32}]}],"destroy":[{"__symbolic":"method"}],"checkCompact":[{"__symbolic":"method"}],"checkCompactUp":[{"__symbolic":"method"}],"moveUpTillCollision":[{"__symbolic":"method"}],"checkCompactLeft":[{"__symbolic":"method"}],"moveLeftTillCollision":[{"__symbolic":"method"}]}}}}]
[{"__symbolic":"module","version":4,"metadata":{"GridsterCompact":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":7,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./gridster.interface","name":"GridsterComponentInterface","line":10,"character":32}]}],"destroy":[{"__symbolic":"method"}],"checkCompact":[{"__symbolic":"method"}],"checkCompactItem":[{"__symbolic":"method"}],"checkCompactUp":[{"__symbolic":"method"}],"moveUpTillCollision":[{"__symbolic":"method"}],"checkCompactLeft":[{"__symbolic":"method"}],"moveLeftTillCollision":[{"__symbolic":"method"}]}}}}]

@@ -23,3 +23,3 @@ "use strict";

if (this.gridster.previewStyle) {
this.gridster.previewStyle();
this.gridster.previewStyle(true);
}

@@ -67,3 +67,3 @@ delete this.gridsterItem;

this.gridster.movingItem = this.gridsterItem.$item;
this.gridster.previewStyle();
this.gridster.previewStyle(true);
this.push = new gridsterPush_service_1.GridsterPush(this.gridsterItem);

@@ -117,3 +117,3 @@ this.swap = new gridsterSwap_service_1.GridsterSwap(this.gridsterItem);

_this.gridster.movingItem = null;
_this.gridster.previewStyle();
_this.gridster.previewStyle(true);
}

@@ -185,3 +185,3 @@ });

this.path.push({ x: this.gridsterItem.$item.x, y: this.gridsterItem.$item.y });
this.gridster.previewStyle();
this.gridster.previewStyle(true);
}

@@ -188,0 +188,0 @@ this.push.checkPushBack();

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

ngOnDestroy(): void;
previewStyle(): void;
previewStyle(drag?: boolean): void;
}

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

};
GridsterPreviewComponent.prototype.previewStyle = function () {
GridsterPreviewComponent.prototype.previewStyle = function (drag) {
if (!this.gridster.movingItem) {

@@ -23,2 +23,5 @@ this.renderer.setStyle(this.el, 'display', 'none');

else {
if (this.gridster.compact && drag) {
this.gridster.compact.checkCompactItem(this.gridster.movingItem);
}
var margin = void 0;

@@ -25,0 +28,0 @@ var curRowHeight = this.gridster.curRowHeight;

@@ -98,2 +98,5 @@ "use strict";

}
if (direction === '') {
return false;
}
var a = this.gridster.findItemsWithItem(gridsterItem.$item);

@@ -100,0 +103,0 @@ var i = a.length - 1, itemCollision;

{
"name": "angular-gridster2",
"version": "4.6.0",
"version": "4.6.1",
"license": "MIT",

@@ -49,19 +49,19 @@ "main": "dist/index.js",

"devDependencies": {
"@angular/animations": "5.2.1",
"@angular/cdk": "5.1.0",
"@angular/cli": "1.6.5",
"@angular/common": "5.2.1",
"@angular/compiler": "5.2.1",
"@angular/compiler-cli": "5.2.1",
"@angular/core": "5.2.1",
"@angular/forms": "5.2.1",
"@angular/http": "5.2.1",
"@angular/language-service": "5.2.1",
"@angular/material": "5.1.0",
"@angular/platform-browser": "5.2.1",
"@angular/platform-browser-dynamic": "5.2.1",
"@angular/platform-server": "5.2.1",
"@angular/router": "5.2.1",
"@types/jasmine": "2.8.5",
"@types/node": "9.3.0",
"@angular/animations": "5.2.2",
"@angular/cdk": "5.1.1",
"@angular/cli": "1.6.6",
"@angular/common": "5.2.2",
"@angular/compiler": "5.2.2",
"@angular/compiler-cli": "5.2.2",
"@angular/core": "5.2.2",
"@angular/forms": "5.2.2",
"@angular/http": "5.2.2",
"@angular/language-service": "5.2.2",
"@angular/material": "5.1.1",
"@angular/platform-browser": "5.2.2",
"@angular/platform-browser-dynamic": "5.2.2",
"@angular/platform-server": "5.2.2",
"@angular/router": "5.2.2",
"@types/jasmine": "2.8.6",
"@types/node": "9.4.0",
"codelyzer": "4.1.0",

@@ -81,3 +81,3 @@ "core-js": "2.5.3",

"karma-jasmine-html-reporter": "0.2.2",
"protractor": "5.2.2",
"protractor": "5.3.0",
"rxjs": "5.5.6",

@@ -84,0 +84,0 @@ "systemjs": "0.20.19",

@@ -233,2 +233,5 @@ angular-gridster2

### Having iFrame in widgets content
iFrames can interfere with drag/resize of widgets. For a workaround please read [this issue #233](https://github.com/tiberiuzuld/angular-gridster2/issues/233)
### Interact with content without dragging

@@ -235,0 +238,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc