You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
576 B
35 lines
576 B
function $qs(css) { return(document.querySelector(css)) }
|
|
|
|
HTMLWidgets.widget({
|
|
|
|
name: 'xmltreeview',
|
|
type: 'output',
|
|
|
|
factory: function(el, width, height) {
|
|
|
|
return {
|
|
|
|
view: { },
|
|
|
|
renderValue: function(param) {
|
|
|
|
//empty el in case of dynamic/Shiny
|
|
el.innerHTML = "";
|
|
|
|
//add CSS overflow scroll to el
|
|
if (param.scroll) { el.style.overflow = "scroll" }
|
|
|
|
var view = new Viewer(param.xmlDoc);
|
|
view.appendTo(el);
|
|
|
|
this.view = view;
|
|
|
|
},
|
|
|
|
resize: function(width, height) { }
|
|
|
|
};
|
|
|
|
}
|
|
|
|
});
|