Giter Site home page Giter Site logo

katoid / angular-grid-layout Goto Github PK

View Code? Open in Web Editor NEW
420.0 10.0 59.0 3.86 MB

Responsive grid with draggable and resizable items for Angular applications.

Home Page: https://katoid.github.io/angular-grid-layout

License: MIT License

JavaScript 1.80% TypeScript 78.86% HTML 10.92% SCSS 8.42%
angular grid grid-layout draggable resizable drag-and-drop responsive

angular-grid-layout's Introduction

Angular Grid Layout

npm MIT commitizen PRs

Angular Grid Layout is a grid layout system with draggable and resizable items for Angular Applications. It is mainly designed to create highly customizable dashboards.

Its core functionalities are based in the well known React-Grid-Layout library. It can be considered a 'port' (with some changes) to the Angular ecosystem. Both cover the same necessities.

demo example

Features

  • No dependencies
  • Draggable items
  • Resizable items
  • REDUX friendly (akita, ngrx, ngxs...)
  • Customizable Drag & Resize handles.
  • 3 modes of grid compaction: vertical, horizontal and free (exact same algorithm as React-Grid-Layout)
  • Add/Remove items
  • High performance
  • Supports touch devices
  • Auto-scrolling while dragging

Compatibility

Version Compatibility
>= 2.0.0 Angular 14 & 15
>= 1.1.0 && < 2.0.0 Angular 12, 13 & 14
>= 0.1.1 && < 1.1.0 Angular 9, 10 & 11

Demos

Playground - Stackblitz

Custom handles

Real life example

Installation

To use @katoid/angular-grid-layout in your project install it via npm:

npm install @katoid/angular-grid-layout --save

Usage

Import KtdGridModule to the module where you want to use the grid:

import { KtdGridModule } from '@katoid/angular-grid-layout';

@NgModule({
  imports: [KtdGridModule]
})

Use it in your template:

<ktd-grid [cols]="cols"
          [rowHeight]="rowHeight"
          [layout]="layout"
          (layoutUpdated)="onLayoutUpdated($event)">
    <ktd-grid-item *ngFor="let item of layout; trackBy:trackById" [id]="item.id">
        <!-- Your grid item content goes here -->

        <!-- Optional Custom placeholder template -->
        <ng-template ktdGridItemPlaceholder>
            <!-- Custom placeholder content goes here -->
        </ng-template>
    </ktd-grid-item>
</ktd-grid>

Where template variables could be:

import { ktdTrackById } from '@katoid/angular-grid-layout';

cols: number = 6;
rowHeight: number = 100;
layout: KtdGridLayout = [
    {id: '0', x: 0, y: 0, w: 3, h: 3},
    {id: '1', x: 3, y: 0, w: 3, h: 3},
    {id: '2', x: 0, y: 3, w: 3, h: 3, minW: 2, minH: 3},
    {id: '3', x: 3, y: 3, w: 3, h: 3, minW: 2, maxW: 3, minH: 2, maxH: 5},
];
trackById = ktdTrackById

API

Here is listed the basic API of both KtdGridComponent and KtdGridItemComponent. See source code for full knowledge of the API.

KtdGridComponent

/** Type of compaction that will be applied to the layout (vertical, horizontal or free). Defaults to 'vertical' */
@Input() compactType: KtdGridCompactType = 'vertical';

/**
 * Row height as number or as 'fit'.
 * If rowHeight is a number value, it means that each row would have those css pixels in height.
 * if rowHeight is 'fit', it means that rows will fit in the height available. If 'fit' value is set, a 'height' should be also provided.
 */
@Input() rowHeight: number | 'fit' = 100;

/** Number of columns  */
@Input() cols: number = 6;

/** Layout of the grid. Array of all the grid items with its 'id' and position on the grid. */
@Input() layout: KtdGridLayout;

/** Grid gap in css pixels */
@Input() gap: number = 0;

/**
 * If height is a number, fixes the height of the grid to it, recommended when rowHeight = 'fit' is used.
 * If height is null, height will be automatically set according to its inner grid items.
 * Defaults to null.
 * */
@Input() height: number | null = null;


/**
 * Parent element that contains the scroll. If an string is provided it would search that element by id on the dom.
 * If no data provided or null autoscroll is not performed.
 */
@Input() scrollableParent: HTMLElement | Document | string | null = null;

/** Number of CSS pixels that would be scrolled on each 'tick' when auto scroll is performed. */
@Input() scrollSpeed: number = 2;

/** Whether or not to update the internal layout when some dependent property change. */
@Input() compactOnPropsChange = true;

/** If true, grid items won't change position when being dragged over. Handy when using no compaction */
@Input() preventCollision = false;

/** Emits when layout change */
@Output() layoutUpdated: EventEmitter<KtdGridLayout> = new EventEmitter<KtdGridLayout>();

/** Emits when drag starts */
@Output() dragStarted: EventEmitter<KtdDragStart> = new EventEmitter<KtdDragStart>();

/** Emits when resize starts */
@Output() resizeStarted: EventEmitter<KtdResizeStart> = new EventEmitter<KtdResizeStart>();

/** Emits when drag ends */
@Output() dragEnded: EventEmitter<KtdDragEnd> = new EventEmitter<KtdDragEnd>();

/** Emits when resize ends */
@Output() resizeEnded: EventEmitter<KtdResizeEnd> = new EventEmitter<KtdResizeEnd>();

/** Emits when a grid item is being resized and its bounds have changed */
@Output() gridItemResize: EventEmitter<KtdGridItemResizeEvent> = new EventEmitter<KtdGridItemResizeEvent>();

KtdGridItem

/** Id of the grid item. This property is strictly compulsory. */
@Input() id: string;

/** Min and max sizes of the grid item. Any of these would 'override' the min/max values specified in the layout. **/
@Input() minW?: number;
@Input() minH?: number;
@Input() maxW?: number;
@Input() maxH?: number;

/** Whether the item is draggable or not. Defaults to true. Does not affect manual dragging using the startDragManually method. */
@Input() draggable: boolean = true;

/** Whether the item is resizable or not. Defaults to true. */
@Input() resizable: boolean = true;

/** CSS transition style. Note that for more performance is preferable only make transition on transform property. */
@Input() transition: string = 'transform 500ms ease, width 500ms ease, height 500ms ease';

/** Minimum amount of pixels that the user should move before it starts the drag sequence. */
@Input() dragStartThreshold: number = 0;

/**
 * To manually start dragging, route the desired pointer events to this method.
 * Dragging initiated by this method will work regardless of the value of the draggable Input.
 * It is the caller's responsibility to call this method with only the events that are desired to cause a drag.
 * For example, if you only want left clicks to cause a drag, it is your responsibility to filter out other mouse button events.
 * @param startEvent The pointer event that should initiate the drag.
 */
startDragManually(startEvent: MouseEvent | TouchEvent);

TODO features

  • Add delete feature to Playground page.
  • Add example with custom drag handles.
  • Add Real life example with charts and grid items with some kind of controls.
  • Add dragStartThreshold option to grid items.
  • Auto Scroll vertical/horizontal if container is scrollable when dragging a grid item. (commit).
  • Grid support for minWidth/maxWidth and minHeight/maxHeight on grid items.
  • Add grid gap feature. (commit)
  • Customizable drag placeholder. (commit).
  • rowHeight to support also 'fit' as value instead of only CSS pixels (commit).
  • Check grid compact horizontal algorithm, estrange behaviour when overflowing, also in react-grid-layout.
  • Grid support for static grid items.
  • Add all other resize options (now is only available 'se-resize').
  • Documentation.

IMPORTANT: These features would be done in the near future. If any lib user needs them earlier, we encourage you to contribute to this project and speed up the process! To do so, please:

  1. Open an issue mentioning one of these features.
  2. Explain your thoughts on how to implement it & we will discuss the possible solutions.
  3. Do a Merge Request when the feature is done and tested.

Troubleshooting

  • Mutating the layout would cause an error like: 'ERROR TypeError: Cannot read property 'id' of undefined'. Never mutate the layout, always return a new instance when modifying it.
  • Always use trackBy for the ngFor that renders the ktd-grid-items. If not, Angular would always re-render all items when layout changes.
  • My Grid Item 'content' doesn't resize well when size changes. This may be caused for 'transform' property in ktd-grid-item, try to remove transform animations on 'width' and 'height' properties. You can also watch the real-life-example which uses other technique valid also.

angular-grid-layout's People

Contributors

arnoudb avatar below43 avatar devin-harris avatar jvquarck avatar llorenspujol avatar pcurrivan avatar sheikalthaf avatar silverslytherin1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

angular-grid-layout's Issues

bug: Dragged item should keep elevated `z-index` while animating back to it's placeholder location

This may not necessarily be a bug, but it seems odd to me.

While a grid item is being dragged, it's z-index value is set to a high value (1000) to visually layer it on top of the other grid items. Immediately upon releasing the drag, the z-index value is restored to it's default value, and the grid items layer according to natural DOM order.

This places the dragged item animating back to it's placeholder location behind other items that came after it.
GIF_no_z

In my opinion, the dragged item animating back to it's placeholder location is still "more important" than the other grid items until it's drag [visually] fully completes and should therefore keep it's high z-index value until the animation/transition ends.
Like this:
GIF

This keeps the visual behavior consistent for any dragged item --> a user not aware of DOM order layering may very well question why the animating dragged item sometimes is over top of items and sometimes not.

This issue about adding a CSS class for the animating to placeholder state could easily help solve this.

feature: advanced gravity (compactType) options

It would be nice to have more then hor/vert gravity options. Especially combined hor+vert, like:
export type CompactType = ('top' | 'left' | 'right' | 'bottom' | 'top-left' | 'left-top' | 'right-bottom' .......) | null | undefined;

removeItem: Couldn't find the specified grid item for the id: 0 in katoid-angular-grid-layout.mjs:1637

So I'm trying to replicate the removeItem functionality as implemented in the playground sample code. As far as I can tell, ktdArrayRemoveItem does what it's supposed to do, i.e. it removes the item with the given id from this.layout

Problem is, that this is not reflected in the UI and throws the above error in the console.

The comment in removeItem says

Important: Don't mutate the array. Let Angular know that the layout has changed creating a new reference.

Apparently, Angular (14.1.3 in my case) "doesn't get the message". What am I missing here?

Facing multiple issues while working with angular 7

Hi Team
I am trying angular grid layout with angular 7. But getting following issue

Uncaught TypeError: Object(...) is not a function
    at Module../node_modules/@katoid/angular-grid-layout/fesm2015/katoid-angular-grid-layout.js (katoid-angular-grid-layout.js:797)
    at __webpack_require__ (bootstrap:78)
    at Module../src/app/playground/playground.component.ts (main.js:2420)
    at __webpack_require__ (bootstrap:78)
    at Module../src/app/app-routing.module.ts (main.js:79)
    at __webpack_require__ (bootstrap:78)
    at Module../src/app/app.module.ts (app.component.ts:9)
    at __webpack_require__ (bootstrap:78)
    at Module../src/main.ts (main.ts:1)
    at __webpack_require__ (bootstrap:78)

client:148 [WDS] Warnings while compiling.
warnings @ client:148
client:154 ./node_modules/@katoid/angular-grid-layout/fesm2015/katoid-angular-grid-layout.js 797:23-41
"export 'ɵɵdefineInjectable' was not found in '@angular/core'
warnings @ client:154
client:154 ./node_modules/@katoid/angular-grid-layout/fesm2015/katoid-angular-grid-layout.js 797:115-123
"export 'ɵɵinject' was not found in '@angular/core'
warnings @ client:154

I have seen given stackblitz example and there it seems to have work with angular 11.

Does this library works well with angular 7 ? Am I missing something here? Please help.

bug: Grid operation resulting in a changed grid size (e.g. added scrollbar) can make items extend past the grid or have empty grid areas

See GIF below, where the first drag and drop results in the grid height increasing, causing a scrollbar to be added to the page reducing the width of the grid --> top right grid item is now extending past the grid. Moving the item back to its original position, causing the scrollbar to be removed and increasing the grid width, now leaves empty space on the right side of the grid until the next move operation begins.

GIF

Perhaps this falls under the category of how to handle updating grid items when the grid size is changed in the middle of a drag operation or even just sitting statically (StackBlitz --> class is added/removed every two seconds causing the grid size to change, yet the item sizes aren't updated without triggering a drag operation).

GIF

Possible solution may start with adding a ResizeSensor to the ktd-grid element.

Scroll issue with compact type free mode

Hello!

I'm having an issue which you can replicate in the playground (https://katoid.github.io/angular-grid-layout/playground).
With the next configuration:

  • Compact type -> -
  • Row height -> fit
  • Height -> 200 (for example)
  • Prevent collision -> true

When you drag an object to the bottom of the page it just becomes crazy and the objects disappear. Probably because dragging the object to the bottom makes the grid height to increase (I think it shouldn't as we fixed it with the height input).

I think there is no way to really fix the height right now, so not making it bigger when you drag an object to the bottom and I would like to have this. I guess this bug is related to that.

Thanks!

Feature: add preventCollision flag

In react-grid-layout there is preventCollision flag, which prevents layout from getting messed up in no compaction mode.
I would love to have this feature in there, I already made an implementation of it (it uses code from react-grid-layout which was already there).

Feature: PreventCollision move rows

Hi, I'm using this setup

  • compactType = "horizontal"
  • preventCollision = "true"

Cattura

I would like that by moving element 8 above element 11, it positions itself between element 5 and element 11 moving the whole row down (both element 11 and element 7 move down)

Cattura2

I would like to have this functionality without giving up the other functionality given by the attributes compactType = "horizontal" and preventCollision = "true". Or in any case I would need the lines to be locked: if I move an element up it must be possible to insert it only if there is space in that line otherwise it creates a new line. Same reasoning below if I move the element up the elements of the rows down shouldn't move. (Items in a row must be locked to that row and not move to other rows)

I thought of implementing this by catching the "dragStarted", "dragEnded" events and updating the layout manually, but the y of the element doesn't change when you drop it on another element (with preventCollision="true") and there is no event that is triggered on each change of x/y (dragging)

Surely there is a better way to implement this within the library

Thank you

Updating layout

I'm using this combined with angular 12, and currently it works good but found 1 small problem

public layout: KtdGridLayout = [
{ id: '0', x: 0, y: 0, w: 3, h: 3 },
{ id: '1', x: 3, y: 0, w: 3, h: 3 },
{ id: '2', x: 0, y: 3, w: 3, h: 3 },
{ id: '3', x: 3, y: 3, w: 3, h: 3 },
];

When I then try to add another box like this.layout.push({ id: '4', x: 0, y: 12, w: 3, h: 3 }) it comes with these erros:

image

Can this be fixed fairly simple

feature: Add CSS class for the dragged grid item animating back to it's placeholder location

Similar to the CDK drag-drop library's cdk-drag-animating class...

Classes should be added to the grid and grid items for each of their different "states" - one of these being the dragged item animating back to it's placeholder location after a pointer up event.

CDK drag/drop source for inspiration:
https://github.com/angular/components/blob/6eff9386b8145e4b3d50c59d353787d103d2fa8d/src/cdk/drag-drop/drag-ref.ts#L1011

Upgrade to Angular v13

Upgrade from Angular v12 to Angular v13

Things to note:

1- See how move custom tslint-rules to eslint

2- See how we can ensure that a lib bundled with Angular v13 can safely have peerDependencies with a minor angular version, for example Angular v12. In theory, if we don't use any exclusive api feature of Angular v13, it should work with Angular v12.But Angular states this in their documentation:

The Angular version used to build an application should always be the same or greater than the Angular versions used to build any of its dependent libraries. For example, if you had a library using Angular version 13, the application that depends on that library should use Angular version 13 or later. Angular does not support using an earlier version for the application.

We don't want now to cut support to Angular v12, so this is an important thing to study before upgrading.

PR (by @sheikalthaf): #34

Max Height bug?

Hi

How can i prevent this from happen?

There is no real way of use a fixed height?

Thanks a lot for your work

77990ed413d86e6d1411783e548bff0e.mp4

Option to add vertical scroll with an external button

Hey,

Right now the grid only adds scroll when you add an object on the bottom so it needs to grow.
What about an option where the grid doesn't need objects to grow so you can add scroll with a button (for example) and then fill this space with the objects that you want?

Regards,

Is there a way to prevent mouse events propgating to grid when interacting with contents of grid item?

Thank you for developing this great library.
I am using ng2-qgrid library to display table in grid-item. When I try to resize the column of the table, mouse drag event gets propagated to grid causing entire item to be dragged instead of column being resized. So my question is this is there a way/mechanism to prevent mouse interactions from bubbling up to grid?

Thanks in advance for pointers/solution.

Is it possible to use in Angular 7?

First of all great work, made my day when I stumbled upon this repo!

I'm trying to use it in Angular 7, but when I import KtdGridModule it throws the following error:
image

I suppose it's some versioning issue, any idea?

Thanks ^^

Grid don't show anything

Good Morning,
i have an important bug in my dashboard, so when the page is loading(together with my API calls) the grid don't show anything.
but if i change twice the tab, the grid retrieve the charts

image

Request: Static column widths

There is a rowHeight which is respected.

There should also be a columnWidth which is respected as well. I'd like to have a grid not be free-form/relative column widths but instead should use absolute widths. Eg a grid item can be 1x1 or 1x2 and keep its aspect ratio.

Is this possible today or would I need to fork this solution?

Resize handle moves when content scrolls

Hi,

Loving this component to enable us to have flexible dashboards in our app. We have however discovered something I can find no solution for...

If the content of a tile needs to be scrolled, the resize handle moves with the content when scrolling, the result looks like this:
image

Is this a bug or am I missing something?

Thanks,

-- Peter.

newly added item always gives itself a different position in a specific scenario

I have a small issue with the ktd grid for angular which might be an intended feature.

So my current school and work project uses the premade functions from the stackblitz example for adding and removing ktdGridLayoutItems. I only seem to get a single issue with this code.

Let me first explain the situation. I am using the grid to make a multi-purpose interactive calendar.
so the grid will be a (hours * quarters = 36) Y height and a day's (Monday to Sunday+ time placement = 8) X width.

So I generate my grid row by row the calculated id is what you see in the grid elements.

image

If I add and remove 6 height worth of items on the y = 0 and y = 1 everything works fine.
But when doing the same on any y position higher than 0 or 1 it automatically adds 1 to the given y value.

Here the prompt asks for the height of the element I want to push at the clicked location.
I start adding an item at x 5 and y 3 with a height of 4. It successfully removes 4 elements and then adds a 4 high item in its place

image (1)

everything looks good. But the Data isn't.
result

Now the logs say the given y pos is still 3(This is the y position of the initial element I choose to replace). But when I open the actual objects I see it's suddenly 4. Where did this change come from?
console-givenobject-changedobject-givenYpos

Is this the intended automatic placement of the grid? or is this a weird code bug? See underneath for the code. and the values used.
do note the extra ktdlayout-gridlist is for checking purposes

Remove Item
image

Add Item
image

Generate layout
image
where cols = 8
and rows = 36

html
image

values:
Starting pos: X:5 Y:3 W:1 H:1
Element to be placed on starting pos: X5: Y:3 W:1 H:4
All values are copied over except for the height which is replaced by the user prompt and checked for typing.
After the elements get removed the new item gets added. And shows the correct data.
But further opening the object in the log you will see the y value has suddenly risen to 4.
This happens everywhere except for y=0 and y=1

layout.txt

the layout can also be generated via the above code do note this layout does not include my added elements for hours and days definitions

Changing background color of ktd-grid-item

Hi. I'm trying to change background color of a grid item and cannot find a solution how to do it, even with ng-deep. Is there a way to change the color of a grid item? Thanks

Custom Drag placeholder

This is a feature request for the Customizable drag placeholder listed in the TODO features section of the project.

Running into use cases for this because I want different background coloring for the placeholder div. Work around for this specific use case is pretty straight forward with some css manipulations, but the .ktd-grid-item-placeholder element was little hard to find at first, especially since its dynamically added and removed from the dom after drag ends.
image

Could also potentially see use cases for adding custom content to the placeholder div, like an icon for example. Thus I think it would be a good idea to use a TemplateRef for the placeholder div, then instead of dynamically appending and removing it from the dom, dynamically adjusting its display style from 'none' to 'block' so the template can have a ngTemplateOutlet somewhere on the dom at all times

Potential solution listed on this merge request:
#61

Drag Handle Inside Child Component

Putting the ktdGridDragHandle directive inside a child component does not work:

<ktd-grid-item><my-item></my-item></ktd-grid-item>

my-item.component.ts:
<div ktdGridDragHandle ></div> <div>My Item Content</div>

I modified the stackblitz Custom Handles example to show this: https://stackblitz.com/edit/angular-grid-layout-playground-dfe5up?file=src/app/custom-handles/my-item/my-item.component.html

I believe this is related to this issue *

Is there a workaround for this that allows me to use a component inside the ktd-grid-item?

I tried making a HostListener in my-item and calling stopPropagation / stopImmediatePropagation on all mousedown events except for those from the drag handler element, but this breaks the intended mousedown functionality of the item content.

Should this perhaps be event-based? (my-item could Output mousedown and mouseup from its internal handle element, and ktd-grid-item could handle the events)

* EDIT: This is not due to an issue with Angular - it is working as intended for ContentChildren to be unable to find elements in child components: https://angular.io/api/core/ContentChildren#description "Does not retrieve elements or directives that are in other components' templates, since a component's template is always a black box to its ancestors."

Integration with plotly

When integrating with plotly - plotly graph will not resize. Is there any support for plotly graphs?

Set height to Fit the Screen Size

I want the grid height to not exceed the screen size. in other words no scroll bar. So If i resize a certain grid item, it should not exceed the screen size.
I thought of disabling resize but i do want the resize to happen within certain area.
thanks

Insertion in empty place, even if place is not enough

Want to share my idea!
Look on layout example, I want achieve following functionality, when we are moving card, in different places appears a placeholder if it enough place to insert card in certain place, it's good, but better can be, if we decrease module to minimalWidth and drawn a projection (placeholder) in a place with width that less width of our card, take a look on examples bellow. So if I hover card 7 (while dragging) over card with number 4, width of my module should decreases to width that is equal width of empty space on the right side of fourth card, and drawed a placeholder, but by condition that it's width is >= minimalWidth.
How hard to implement it and can you implement this without changing whole algorithm of rearanging cards?
image
image

minH,minW,maxH,maxW properties is not working when resizeable is false and not getting applied to grid items inline style property.

1 ) minH, minW, maxH, maxW these properties are not getting applied in grid items style property. These properties work only in resizeable=true mode. But not when I try to set "h" less then "minH". It is setting the less height which is less than minH. I think this should not happen. Please help me in this information.
I am facing a issue that I want the height dynamic of grid items. It should adjust based on content div height with resizeable=false. Now I am not able to achieve this. I am adding min-height to grid items manually and I was trying to remove the height property from the grid items by JavaScript but its not getting removed and getting automatically applied to grid items again which is weird. I am trying to do this to make the responsive/dynamic height to work by removing the "height" property and setting just the "min-height" property. And the content will also have min-height then my dynamic or responsive height issue will be resolved. Could you please help me on to achieve. How can i make grid items height adjust automatically with content height ?

  1. Second issue I am facing is that grid items add horizontal scroll to my page with cols="12" rowHeight="50" and widths of grid items are 3,6,3. but this is causing horizontal scroll. We are using vertical compaction.
    [
    { id: '1', x: 0, y: 0, w: 3, h: 8 },
    { id: '2', x: 3, y: 0, w: 6, h: 9.8 },
    { id: '3', x: 9, y: 0, w: 3, h: 11.3 },
    { id: '4', x: 0, y: 11, w: 3, h: 10, minH:5,minW:3},
    { id: '5', x: 3, y: 12.8, w: 6, h: 10 },
    { id: '6', x: 9, y: 14.3, w: 3, h: 10 }
    ];
    @llorenspujol Could you please reply on this.

Angular 13 peer dependency

Hi while installing the package in a new Angular project I am getting-

npm i @katoid/angular-grid-layout --save

npm ERR! While resolving: [email protected] npm ERR! Found: @angular/[email protected] npm ERR! node_modules/@angular/common npm ERR! @angular/common@"~13.2.0" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer @angular/common@"^11.0.6" from @katoid/[email protected] npm ERR! node_modules/@katoid/angular-grid-layout npm ERR! @katoid/angular-grid-layout@"*" from the root project

Is this the correct way to install this? Am I missing something?

Round positions to whole pixels?

Hi,

i noticed that the positioning of items can be on sub-pixels depending on the grid size / number of columns. Say a grid item is positioned on 150.5 px the text inside an item can become slightly more blurry.

It would be great to have an option to use rounded values for the positioning of the grid items.

BTW, congrats with the 2.0 release! An extra reason to push for out project to move to angular 14 :-)

Moving widget between multiple dashboard feature

Hi,

Need feature to move a widget from one dashboard to another dashboard. In my case it is required to very hardly. Is there any way to implement with current release. Or it requires development?

Thanks

Is it possible to use in Angular 13?

First of all really nice work, congrats! I have tried to use in latest Angular version(13), I am getting "not a known element" error when I use kt-grid even though I imported it in app.module.ts
I am providing the screenshot of the error, any help appreciated. Thanks in advance

Screen Shot 2021-12-27 at 17 12 25

FEATURES REQUEST -

It would be usefull an option to force every element in a row to have the same height.

Ex.

I have three elements on row. All with height 1. When I change height of one of them, the others height will be adjust to the same height. So every elements in a row has always the same height.

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.