-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
almost every time when i load a page the contents of the CM area disappears, but after i press CTRL+Z everything re-appears and works as expected.
any idea what i'm doing wrong here?
thank you.
window.Debugger = (function() {
return {
init: function() {
//init resizer
$(".debug-panel:not(:first)").splitter().data('splitter')
.trigger('init')
.on('resize-start', function() {
$('#left-area .overlay').show();
})
.on('resize-end', function() {
$('#left-area .overlay').hide();
});
//codemirror
CodeMirror.keyMap.basic.Tab = 'indentMore';
this.init_python_editor($("#python-editor"));
...
},
not_saved: false,
init_python_editor: function($el) {
var _this = this;
var cm = this.python_editor = CodeMirror($el[0], {
value: script_content,
mode: "python",
indentUnit: 4,
lineWrapping: true,
styleActiveLine: true,
lineNumbers: true,
autofocus: true
});
var s = new BCSocket("http://" + location.hostname + ":7007/channel", {origin: "http://" + location.hostname + ":7007/channel",
crossdomainXhr: true,
reconnect: true
});
//
var sjs = new window.sharejs.Connection(s);
var doc = sjs.get('users', project_name);
doc.subscribe();
doc.whenReady(function () {
if (!doc.type) doc.create('text');
if (doc.type && doc.type.name === 'text') {
doc.attachCodeMirror(cm);
}
});
.....
Metadata
Metadata
Assignees
Labels
No labels