Skip to content

Commit

Permalink
scroll messages to bottom + fill in default websocket URL
Browse files Browse the repository at this point in the history
For convenience.
  • Loading branch information
Richard van Dijk authored and Richard van Dijk committed Sep 28, 2015
1 parent 21e3adc commit 777848b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions demo/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Ext.define ('DEMO.view.OpenConnection', {
var container = Ext.ComponentQuery.query('panel[title="' + url + '"] > container#messageCt')[0];
var messageBox = container.getEl().dom.getElementsByClassName("messageBox")[0];
messageBox.innerHTML += '> ' + data + '<br/>';
messageBox.scrollTop = messageBox.scrollHeight;
} ,
close: function (ws) {
var panel = Ext.ComponentQuery.query('panel[title="' + url + '"]')[0];
Expand Down Expand Up @@ -110,6 +111,7 @@ Ext.define ('DEMO.view.OpenConnection', {
xtype: 'textfield' ,
anchor: '100%' ,
fieldLabel: 'URL' ,
value: 'ws://localhost:9001' ,
labelAlign: 'top' ,
listeners: {
specialKey: function (tf, evt) {
Expand Down

0 comments on commit 777848b

Please sign in to comment.