yskang

threejs-viewer-14

May 6th, 2020 (edited)
1,062
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. setTitle( title ) {
  2.     this.titlebar.innerHTML = '<div><p>' + title + '</p></div>';    
  3.     this.titlebar.title = title;
  4. }
  5.  
  6. init() {
  7.     const container = document.createElement( 'div' );
  8.     container.classList.add( 'property-panel' );    
  9.     this.parentContainer.appendChild( container );
  10.     this.container = container;
  11.  
  12.     const titlebar = document.createElement( 'div' );
  13.     titlebar.classList.add( 'property-panel-titlebar' );
  14.     container.appendChild( titlebar );
  15.     this.titlebar = titlebar;
  16.  
  17.     const scrollContainer = document.createElement( 'div' );
  18.     scrollContainer.classList.add( 'property-panel-scroll-container' );
  19.     container.appendChild( scrollContainer );
  20.     this.scrollContainer = scrollContainer;
  21.  
  22.     const table = document.createElement( 'table' );
  23.     table.classList.add( 'property-panel-content-table' );
  24.     scrollContainer.appendChild( table );
  25.     this.content = table;
  26.  
  27.     const tbody = document.createElement( 'tbody' );
  28.     table.appendChild( tbody );
  29. }
Add Comment
Please, Sign In to add comment