Giter VIP home page Giter VIP logo

Comments (7)

walakad avatar walakad commented on August 18, 2024 5

Hi @tiberiuzuld,

Thanks for your response, your reactivity to answer and for your grid module ^^
I found how to maximize my widget (in the parent container), so I give my solution in case others are interested.
The solution is CSS only.

I the grid item, I set a specific class to the item I want to maximize , like :
<gridster-item [item]="item" *ngFor="let item of items" [ngClass]="item.isMaximized ? 'widget-maximize': ''">

And my css is :
.widget-maximize {
left: 0px !important;
top: 0px !important;
width: 100% !important;
height: 100% !important;
z-index: 500;
}

from angular-gridster2.

plaetzchen79 avatar plaetzchen79 commented on August 18, 2024 1

The Css solution is awesome.
I have tried the hole day until i found this simple solution.
Should be in the documentaion or example since this is a very common task

from angular-gridster2.

tiberiuzuld avatar tiberiuzuld commented on August 18, 2024

Hi @pgsrw ,
Yes it is possible by using this.options.optionsChanged() from the options object you gave to the grid after you made the change to any option from grid and item.

resizeItem($event, item) {
  item.y = 10;
  this.options.optionsChanged();
}
<button md-icon-button md-raised-button class="resize-handler" (click)="resizeItem($event, item)">
  <md-icon>open_with</md-icon>
</button>

Made a fix in v2.9.1 for the item options not being updated.

Let me know if this fixes your issue.

from angular-gridster2.

pgsrw avatar pgsrw commented on August 18, 2024

Hi,
yes it works!! great!
thx

from angular-gridster2.

walakad avatar walakad commented on August 18, 2024

Hi tiberiuzuld,

I want to maximize an item too (and then I want to unmaximize it with originals values).

I want to simulate this css :
maximise {
left: 0px ;
top: 0px ;
width: 100%;
height: 100%;
z-index: 500;
}

So, I try to do :
maximiseItem($event, item) {
item.x = 0; // OK
item.y = 0; // OK
item.cols = '100%'; // how?
item.rows = '100%'; // how?
// item.zindex = 500 //how ?
this.changedOptions(); // OK
}

How can I do ? is it possible ?

Thanks

from angular-gridster2.

tiberiuzuld avatar tiberiuzuld commented on August 18, 2024

Hi @walakad ,
There is no way to set cols and rows in %.
Item zIndex you can override from css.

But I think you mean you want to make your widget fullscreen.

This is not possible from library.

I suggest making a separate state for widget full screen where you just display your widget component without the gridster dashboard.

Thanks

from angular-gridster2.

mbshingala28 avatar mbshingala28 commented on August 18, 2024

Hello,
Does anyone provide demo full example of maximizing grid item?

from angular-gridster2.

Related Issues (20)

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.