callbacks: make a method to create a new session

This commit is contained in:
jean-emmanuel 2016-12-06 09:40:18 +01:00
parent fa75365909
commit c2bff09c58

View file

@ -100,7 +100,7 @@ module.exports = {
})
lobby.find('.new').click(function(e){
e.stopPropagation()
init([{}],function(){$('#open-toggle, .enable-editor').click();$('.editor-root').trigger('mousedown.editor')})
module.exports.sessionNew()
})
$('#lobby').append(lobby)
setTimeout(()=>{
@ -117,6 +117,13 @@ module.exports = {
},
sessionNew: function(){
init([{}],function(){
$('#open-toggle, .enable-editor').click()
$('.editor-root').trigger('fake-click')
})
},
stateSend:function(){
var p = utils.loading('New client connecting...')