(i)
| 219 | } |
| 220 | |
| 221 | getElementEditor (i) { |
| 222 | const itemInfo = this.getItemInfo(i) |
| 223 | let schema = this.getItemSchema(i) |
| 224 | schema = this.jsoneditor.expandRefs(schema) |
| 225 | schema.title = `${itemInfo.title} ${i + 1}` |
| 226 | |
| 227 | const editor = this.jsoneditor.getEditorClass(schema) |
| 228 | |
| 229 | let holder |
| 230 | if (this.tabs_holder) { |
| 231 | if (this.schema.format === 'tabs-top') { |
| 232 | holder = this.theme.getTopTabContent() |
| 233 | } else { |
| 234 | holder = this.theme.getTabContent() |
| 235 | } |
| 236 | holder.id = `${this.path}.${i}` |
| 237 | } else if (itemInfo.child_editors) { |
| 238 | holder = this.theme.getChildEditorHolder() |
| 239 | } else { |
| 240 | holder = this.theme.getIndentedPanel() |
| 241 | } |
| 242 | |
| 243 | this.row_holder.appendChild(holder) |
| 244 | |
| 245 | const ret = this.jsoneditor.createEditor(editor, { |
| 246 | jsoneditor: this.jsoneditor, |
| 247 | schema, |
| 248 | container: holder, |
| 249 | path: `${this.path}.${i}`, |
| 250 | parent: this, |
| 251 | required: true |
| 252 | }) |
| 253 | ret.preBuild() |
| 254 | ret.build() |
| 255 | ret.postBuild() |
| 256 | |
| 257 | if (!ret.title_controls) { |
| 258 | ret.array_controls = this.theme.getButtonHolder() |
| 259 | holder.appendChild(ret.array_controls) |
| 260 | } |
| 261 | |
| 262 | return ret |
| 263 | } |
| 264 | |
| 265 | checkParent (elem) { |
| 266 | return elem && elem.parentNode |
no test coverage detected