sussudio
Version:
An unofficial VS Code Internal API
32 lines (31 loc) • 1.34 kB
JavaScript
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { AbstractTree } from "./abstractTree.mjs";
import { IndexTreeModel } from "./indexTreeModel.mjs";
import { Iterable } from "../../../common/iterator.mjs";
import "../../../../css!./media/tree.mjs";
export class IndexTree extends AbstractTree {
rootElement;
constructor(user, container, delegate, renderers, rootElement, options = {}) {
super(user, container, delegate, renderers, options);
this.rootElement = rootElement;
}
splice(location, deleteCount, toInsert = Iterable.empty()) {
this.model.splice(location, deleteCount, toInsert);
}
rerender(location) {
if (location === undefined) {
this.view.rerender();
return;
}
this.model.rerender(location);
}
updateElementHeight(location, height) {
this.model.updateElementHeight(location, height);
}
createModel(user, view, options) {
return new IndexTreeModel(user, view, this.rootElement, options);
}
}