Comments (4)
All event handlers are called before any changes applied to the object. It is done this way to allow events to be cancelable. However, if you need to execute a function after changes applied to the object you can do it this way:
w2ui['layout'].on('resize', function(target, data) {
data.onComplete = function () {
var width = w2ui['layout'].get('main').width;
var height = w2ui['layout'].get('main').height;
console.log(width + 'x' + height);
}
});
You can read more about event flow here: http://w2ui.com/web/docs/utils/events
from w2ui.
You can attach event listeners to the panels, but there is no onResize for the panel, only entire layout. I have noticed, when layout is resized, main panel always resized and possibly some other panel (if it was not window resize). I have added data.panel variable to indicate what panel in addition to main was resized. Just checked into current working version.
from w2ui.
Thanks for you help! it's working now. It's not a continuous update, but it still sets the values after the resize operation has finished.
from w2ui.
Ok, as I don't use facebook, here is my comment: Great library, just what I was looking for: small, fast, easy to use, with a good set of widgets, a great layout system and MIT license. Was kind of hard to find, though, well, it's also very new. Keep up the good work!!
from w2ui.
Related Issues (20)
- custom render of grid checkbox bug HOT 4
- w2Popup - Multiple Custom Buttons HOT 1
- w2grid 2.0 have freezing column have row align not correct HOT 2
- w2grid column's editable with type='select' work ok in v1.5 but NOT work in v2.0 HOT 2
- how to use jquery with w2ui HOT 1
- a regret related to object w2field('combo') in w2ui 2.0.x (nightly) (6/27/2024, 6:00:52 PM)
- Your documentation is messy, some with es6 and some with jquery HOT 1
- V2.0 w2field does not support validate HOT 1
- v2.0 grid toolbar toolbarAdd,toolbarEdit,toolbarSave etc. tooltips don't support w2utils.locale HOT 4
- w2utils.marker breaks sidebar events
- N
- Demos - Grid Toolbar Not Rendering HOT 2
- rename tabs HOT 2
- Using browser's search function (Ctrl+F) with large data of grid gives incorrect total number HOT 2
- Unable to populate data into a form when the form is based on a URL? HOT 4
- Uncaught TypeError: Cannot read properties of undefined (reading 'overlay') at w2field.keyup (w2ui.es6.min.js:449:10111) HOT 2
- w2ui 2.0.dear sir,how to change combo items at runtime."can't refresh" HOT 5
- w2form float field does not allow to input zero after the separator
- mouse scroll error in W2Grid with freezing(fixed) columns
- w2form float field type is not consistent HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from w2ui.