Skip to content
This repository has been archived by the owner on Feb 3, 2022. It is now read-only.

We need 3 features #38

Closed
FreezeSoul opened this issue May 8, 2014 · 18 comments
Closed

We need 3 features #38

FreezeSoul opened this issue May 8, 2014 · 18 comments

Comments

@FreezeSoul
Copy link

I compared your grid with gridster, your grid is very smart, also has a Good performance.
But It has 3 important features Unrealized

  1. Dynamic creation(in codebehind)
  2. Drag resize
  3. Implement resizing of item height
    Look forward to your improved version,Thank you for your good ideas。
@FreezeSoul FreezeSoul changed the title We Need 3 Features We need 3 features May 8, 2014
@ovidiuch
Copy link
Contributor

ovidiuch commented May 8, 2014

  1. We already have an open issue for it, definitely important. Add insertItem and removeItem methods to GridList class #29
  2. Not sure I follow...
  3. This is something we might soon need internally as well, so hopefully it'll come true in the not so distant future. Outside contributions have already started so this is another way it might happen earlier. Feel free to open an issue for this to have more visibility.

@Daijobou
Copy link

Daijobou commented Jul 4, 2014

For "2": I think like: http://gridster.net/demos/resize-limits.html

@RonakKhandelwal
Copy link

@skidding if I could get an update on this, it would be great since no. 1 is a very important feature that we need and it is the sole issue standing between our project and this amazing lib. So if I could get an update I would be so grateful.

@git-ashish
Copy link

@RonakKhandelwal You could consider bridging the gap by making a contribution, its an open source project.

@RonakKhandelwal
Copy link

@git-ashish I definitely would have if I wasn't swamped with this ongoing project. I wanted a library which would take care of all these features so that I have space for some extra work on my plate, anyways I saw a guy who was interested in submitting a pr for the same issue but he never got a response.

@valentin-radulescu-hs
Copy link
Contributor

@RonakKhandelwal I'm open to doing a code review if he submits a PR, don't know to whom you're referring to...

@RonakKhandelwal
Copy link

#82 is the one I'm talking about.

@RonakKhandelwal
Copy link

A solution for no 2. Put this code just under the place where you are actually creating the grid. Somewhere around " $('#grid').gridList({ " function

$( "#grid li" ).resizable({
    ghost: true,
    grid: [$('#grid').data("_gridList")._cellWidth, $('#grid').data("_gridList")._cellHeight],
    minHeight: 10,
    minWidth: 10,
    start: function (event, ui) {
      $("#grid").data("resizing", true);
    },
    stop: function (event, ui) {
        var minHeight = $('#grid').data("_gridList")._cellHeight;
        var minWidth = $('#grid').data("_gridList")._cellWidth;
        $("#grid").data("resizing", false);
        var li = $(ui.originalElement)[0];
        if(!event.revert) {
            var opt = {
            w: Math.round(ui.size.width/ $('#grid').data("_gridList")._cellWidth),
            h: Math.round(ui.size.height / $('#grid').data("_gridList")._cellHeight)
        };
        $('.grid').gridList('resizeItem', li, opt);
        }
    }
  });

@dusiromulo
Copy link

dusiromulo commented Feb 19, 2017

Hey guys, I'm doing a widget for Django that uses this lib. I've implemented add and remove elements, if you want I can post it here.

@RonakKhandelwal
Copy link

@dusiromulo please do, even I am on my way of implementing that and I hope that the author can incorporate the changes in the lib

@dusiromulo
Copy link

dusiromulo commented Feb 19, 2017

What is the best way to put my code here in this page? I've implemented some functions inside gridList.js and jquery.gridList.js and code of theses files are too big. My zip file is not acceptable...

@dusiromulo
Copy link

dusiromulo commented Feb 19, 2017

@dusiromulo
Copy link

dusiromulo commented Feb 19, 2017

Some important changes:

  1. Sorry, but I have to change the DemoGrid structure, because I want two grids in the same page. Create function for creating new item in grid.
  2. Inside jquery.gridList.js on function _applyPositionToItems i'm applying the respective position in the respective HTML element. I need this for calculate the new element position.
  3. Inside gridList.js I create removeItem function, for remove the item of structure and apply new position for items below this item.

Sorry for bad english too.

@RonakKhandelwal
Copy link

@valentin-radulescu-hs good enough for pr? If you want some different implementation let me know I'll submit a pr myself.

@RonakKhandelwal
Copy link

@dusiromulo I tested your solution, the remove overlaps items when the items are of different sizes.

@valentin-radulescu-hs
Copy link
Contributor

@dusiromulo Would you mind opening a PR? It would make it much easier to review. If you're unfamiliar with the git workflow there are plenty of tutorials online, some I used are: this and this.

The process would be:

  1. Fork this repo and clone it on your machine
  2. Make a branch and apply your changes
  3. Publish the branch and make a PR to this repo for that branch

@dusiromulo
Copy link

Yeah, I'll do this!

@KarthikJayakumar
Copy link

+1 Any Updates?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants