Flyer53 / jsPanel

A jQuery Plugin to create highly configurable floating panels, modals, tooltips and hints/notifiers for use in a backend solution and other web applications.
http://v2.jspanel.de/
Other
163 stars 56 forks source link

In jsPanel2 Require one property to set the status while creating the panel initially #16

Closed piu closed 9 years ago

piu commented 9 years ago

Can you provide a property to set the status of the panel while creating? say for e.g I want the panel to be in minimized state initially, so instead of calling the minimize() function separately , can we assign at the initial stage of creating of the jspanel?

Flyer53 commented 9 years ago

I will think about this. But give me some time please, I'm just in the final stage of getting version 2.2.0 ready. So it might be something for 2.3

Flyer53 commented 9 years ago

@piu I thought about this a bit and can't see a really good reason that justifies extra code since you can achieve this quite easily already:

$.jsPanel({
  position: 'center',
  callback: function (panel) {
    panel.minimize();
  }
});

And since the callback can be an array of functions it won't limit you in any way.

Ok, this way the panel appears first and than minimizes, maximizes or whatever. But tihis isn't necessarily a disadvantage because you see something happen. Imagine a panel that appears only minimized. Isn't there a good chance that a user might not realize it's there?

What do you think?

Flyer53 commented 9 years ago

jsPanel version 2.4.0 will have an option corresponding to this issue.