Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function TMController(containers, buttons, document) {
// FIXME: check for every container and button and throw if any are missing
Object.defineProperties(this, {
containers: { value: containers },
buttons: { value: buttons }
});
this.simulator = new TMSim(containers.simulator, buttons.simulator);
// Set up ace editor //
var editor = ace.edit(containers.editor);
Object.defineProperty(this, 'editor', {
value: editor,
enumerable: true
});
editor.session.setOptions({
mode: 'ace/mode/yaml',
tabSize: 2,
useSoftTabs: true
});
editor.setOptions({
minLines: 15,
maxLines: 50
});
// suppress warning about
// "Automatically scrolling cursor into view after selection change"
editor.$blockScrolling = Infinity;
function TMDocumentController(containers, buttons, document) {
this.simulator = new TMSimulator(containers.simulator, buttons.simulator);
// Set up ace editor //
var editor = ace.edit(containers.editor);
editor.session.setOptions({
mode: 'ace/mode/yaml',
tabSize: 2,
useSoftTabs: true
});
editor.setOptions({
minLines: 15,
maxLines: 50
});
// suppress warning about
// "Automatically scrolling cursor into view after selection change"
editor.$blockScrolling = Infinity;
var editorButtons = buttons.editor;
var self = this;
editorButtons.load