Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_model_name: 'TreeModel',
_view_name: 'TreeView',
_model_module: 'jupyter_cadquery',
_view_module: 'jupyter_cadquery',
_model_module_version: "v0.9.5",
_view_module_version: "v0.9.5",
icons: null,
tree: null,
state: null
})
});
// TreeView
var TreeView = DescriptionView.extend({
initialize: function (parameters) {
DescriptionView.prototype.initialize.apply(this, arguments);
this.icons = this.model.get("icons");
// Be sure to work on deep copy, otherwise object will be updated and
// model.set will not find any differences and nothing will be sent to python!
this.states = clone(this.model.get("state"));
this.treeModel = this.toModel(this.model.get("tree"));
this.listenTo(this.model, "change:state", () => this.updateAllStates());
},
render: function () {
var ul = tag("ul", ["toplevel"]);
ul.appendChild(this.toHtml(this.treeModel));
this.el.appendChild(ul);