Advertisement
RianeSN

Untitled

Sep 19th, 2020
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let myplugin = (function () {
  2.     //
  3.     //
  4.     var postInit = function() {
  5.         var myLayout = window.plugins['goldenlayout'].getGL();
  6.  
  7.         // register our component and replace the default messagewindow
  8.         myLayout.registerComponent( 'mycomponent', function (container, componentState) {
  9.             let mycssdiv = $('<div>').addClass('content myCSS');
  10.             mycssdiv.attr('types', 'mapout');
  11.             mycssdiv.attr('updateMethod', 'newlines');
  12.             mycssdiv.appendTo( container.getElement() );
  13.             container.on("tab", plugins['goldenlayout'].onTabCreate);
  14.         });
  15.  
  16.         console.log("MyPlugin Initialized.");
  17.     }
  18.  
  19.     return {
  20.         init: function () {},
  21.         postInit: postInit,
  22.     }
  23. })();
  24. window.plugin_handler.add("myplugin", myplugin);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement