How To Use • Components • How To Make Changes • License
To use a custom component, you will to create a
Frame inside the uifigure
and then insert
your component into it.
% Create the uifigure
uifig = uifigure();
% Create the frame
frame = weblab.internal.Frame("Parent", uifig);
% Initialize your component
myComponent = weblab.components.MyComponent();
% Insert
frame.insert(myComponent);
Note: The inserted component will occupy the full height and width of the frame. If you want to reposition or resize it inside the figure, use the
Position
property of theFrame
.
These components are currently supported:
- Tree: docs / src
- TagBar: docs / src
- TagFilterTree: docs / src
- Progress: docs / src
- CodeEditor: docs / src
- HTMLContainer: docs / src
More to come! These are the next planned components:
- PDF renderer
- Interactive plots
WIP
If you make changes to the Typescript source code, you will need to rebuild the project. For that, you'll first need Node.js (which comes with npm) installed on your computer.
From a terminal at the project root, type the following commands:
# Go into the HTML source folder
$ cd +weblab/source
# Install dependencies
$ npm install
Now you can make changes in the TS source code, located inside the +weblab/source/src subdirectory.
Important: Once your changes are complete, rebuild the project by running in the terminal
$ npm run build
Issues and pull requests are appreciated. I will do my best to take into account your opinions and recommendations