Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
renderSwaggerEditor() {
if (!_.isNil(this.props.targetService)) {
const $container = $(this.container);
$container.empty();
$container.attr('id', this.swaggerEditorID);
if (this.props.hideSwaggerAceEditor) {
$container.hide();
}
this.swaggerEditor = SwaggerEditorBundle({
dom_id: `#${this.swaggerEditorID}`,
});
const $swaggerAceContainer = $container.find('#ace-editor');
const swaggerAceContainerID = `z-ace-editor-${this.swaggerEditorID}`;
$swaggerAceContainer.attr('id', swaggerAceContainerID);
const swaggerAce = ace.edit(swaggerAceContainerID);
swaggerAce.getSession().setUndoManager(new CustomUndoManager(this.onEditorChange));
swaggerAce.$blockScrolling = Infinity;
swaggerAce.setTheme(ace.acequire(theme));
swaggerAce.setFontSize(fontSize);
this.swaggerAce = swaggerAce;
this.syncSpec();
if (this.props.hideSwaggerAceEditor) {
const editorPanel = $swaggerAceContainer.parent().parent();
renderSwaggerEditor() {
if (!_.isNil(this.props.targetService)) {
const $container = $(this.container);
$container.empty();
$container.attr('id', this.swaggerEditorID);
if (this.props.hideSwaggerAceEditor) {
$container.hide();
}
this.swaggerEditor = SwaggerEditorBundle({
dom_id: `#${this.swaggerEditorID}`,
});
const $swaggerAceContainer = $container.find('#ace-editor');
const swaggerAceContainerID = `z-ace-editor-${this.swaggerEditorID}`;
$swaggerAceContainer.attr('id', swaggerAceContainerID);
const swaggerAce = ace.edit(swaggerAceContainerID);
swaggerAce.getSession().setUndoManager(new CustomUndoManager(this.onEditorChange));
swaggerAce.$blockScrolling = Infinity;
swaggerAce.setTheme(ace.acequire(theme));
swaggerAce.setFontSize(fontSize);
this.swaggerAce = swaggerAce;
this.syncSpec();
if (this.props.hideSwaggerAceEditor) {
const editorPanel = $swaggerAceContainer.parent().parent();
renderSwaggerEditor() {
if (!_.isNil(this.props.targetService)) {
const $container = $(this.container);
$container.empty();
$container.attr('id', this.swaggerEditorID);
if (this.props.hideSwaggerAceEditor) {
$container.hide();
}
this.swaggerEditor = SwaggerEditorBundle({
dom_id: `#${this.swaggerEditorID}`,
});
const $swaggerAceContainer = $container.find('#ace-editor');
const swaggerAceContainerID = `z-ace-editor-${this.swaggerEditorID}`;
$swaggerAceContainer.attr('id', swaggerAceContainerID);
const swaggerAce = ace.edit(swaggerAceContainerID);
swaggerAce.getSession().setUndoManager(new CustomUndoManager(this.onEditorChange));
swaggerAce.$blockScrolling = Infinity;
swaggerAce.setTheme(ace.acequire(theme));
swaggerAce.setFontSize(fontSize);
this.swaggerAce = swaggerAce;
this.syncSpec();
if (this.props.hideSwaggerAceEditor) {
const editorPanel = $swaggerAceContainer.parent().parent();