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)
- Unable to reorder the grid row to the last position
- misalignment of checkbox table rows and data table rows HOT 1
- List with remote source only works once HOT 2
- regex changed in method isAlphaNumeric(val) => ids using paragraph sign are evaluated as invalid HOT 1
- How to use w2ui-2.0 in react? HOT 2
- Grid toolbar refresh with multiSearch enabled shows overlapping controls HOT 1
- Clicking in a grid without records generates script error HOT 2
- How can I prevent the loading message tip from appearing when grid.reload is called?
- Update sidebar.topHTML after initialization HOT 4
- Double-clicking on w2tab makes it invisible
- Deselecting a row with a mouse click stopped working. HOT 3
- W2db.php (server/php) doesn't work on PHP8 HOT 1
- w2grid markSearch() not properly escaping values when highlighting search results HOT 4
- Grid context menu does not close, appears multiple times on right clicks
- Grid advanced search script error when searching with empty input
- Weird ENTER key behavior in Inline Edit with selectType = Cell HOT 2
- w2grid.onSelect event not working corectly
- Как в форме в полях вывести Label большой длины, что бы не срезалось наименование поля HOT 2
- w2ui-lock
- w2grid: when property reorderColumns is true, sorting columns doesn't work as expected
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.