0

How can I catch when hflex is resizing the width of my widget?

asked 2015-11-27 16:28:46 +0800

WilliamB gravatar image WilliamB
1609 1 6

I've an issue where a JS components is resizing itself before hflex has set the new width.

So I wanna trigger the js components redraw after hflex has set its size, but how cna I catch that ?

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-11-28 02:50:27 +0800

bkstorm gravatar image bkstorm
38 3

updated 2015-11-28 13:53:26 +0800

Yesterday, I had the same problem when trying to catch resize event of div component. you can do it at the client side by using CSS element queries: https://github.com/marcj/css-element-queries It's simple. For example:

                var $div = $('#' + zk.Widget.$('$divComponentId').uuid);
            new ResizeSensor($div, function(el){
                console.log('Changed to ' + $div.height()+'px height.');
            });
link publish delete flag offensive edit

Comments

Awesome it's working, thanks!

WilliamB ( 2015-11-30 09:44:40 +0800 )edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2015-11-27 16:28:46 +0800

Seen: 26 times

Last updated: Nov 28 '15

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More