Flyer53 / jsPanel3

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

onResize Event? #61

Closed RobertoMalatesta closed 7 years ago

RobertoMalatesta commented 7 years ago

Ok @Flyer53 .

I just started using JSPanel seriously. And immediately I have a dumm question: Which event is fired when the user manually resizes the dialog? I see maximize, minimize, but no onResize or onManualResize.

--R

Flyer53 commented 7 years ago

There is no such thing as a dumm question 😏 And there are no specific events fired because you can configure the resizeit interaction with callbacks when the panel is created: http://jspanel.de/api/#option/resizeit

$.jsPanel({
    resizeit: {
        start: function(panel, size) {},
        resize: function(panel, size) {},
        stop: function(panel, size) {}
    }
});

The same applies to option dragit and also to jsPanel v4 alpha. I thought it not necessary to add extra events ... do you?

The panel methods resize() and reposition() also accept a callback as argument.

RobertoMalatesta commented 7 years ago

Damn, I even used it some months ago for a test. Thanks! Extra events: no, it's not necessary. It's a slight deformation from me being a middleware guy to plug any event into some pub/sub mechanism (like PostalJS) to decouple compos and logic sacrificing some performance.

--R