Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jumperchen
Created December 4, 2012 06:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jumperchen/4201357 to your computer and use it in GitHub Desktop.
Save jumperchen/4201357 to your computer and use it in GitHub Desktop.
Global Monitor
<script><![CDATA[
zk.afterMount(function () {
zk.Desktop._dt.firstChild.appendChild(new GlobalResizeMonitor());
});
GlobalResizeMonitor = zk.$extends(zk.Widget, {
bind_: function () {
this.$supers('bind_', arguments);
zWatch.listen({onSize: this});
},
unbind_: function () {
this.$supers('unbind_', arguments);
zWatch.unlisten({onSize: this});
},
onSize: function () {
setTimeout(function () {
zk.log('xxx');
}, 100);
},
redraw: function (out) {
out.push('<div', this.domAttrs_(), '></div>');
}
});
]]></script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment