Skip to content

Commit

Permalink
more updating.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Rosenau authored and Nick Rosenau committed Nov 27, 2023
1 parent fdfcd6d commit 0224fb3
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,33 +163,31 @@ annotations = [
- Annotation font styling; user can change font family, font weight, or font color:
```js
annotations = [
{ start: 0, end: 22, name: "Strong promoter", direction: 1, border: "dashed", font: {"fontFamily": "Times New Roman", "fontWeight": 800, "fontSize": 17, "fontColor": "red"}},
{ start: 0, end: 22, name: "Strong promoter", direction: 1, border: "dashed", font: {fontFamily: "Times New Roman", fontWeight: 800, fontSize: 17, fontColor: 'blue'}},
];
```
- Adding an svg icon to annotation; the available icons are part of the SBOL library and can be viewed in the `assets` folder under `src/assets/`, the name of the desired icon must exactly match the filename of the icon in the `assets` folder:
- Adding an svg icon to annotation; the available icons are part of the SBOL library and can be viewed in the `assets` folder under `src/assets/`, the name of the desired icon must exactly match the filename of the icon in the `assets` folder. In this example `promoter` matches the name of the promoter icon file `promoter.png`:
```js
annotations = [
{ start: 0, end: 22, name: "Strong promoter", direction: 1, border: "dashed", font: {"fontFamily": "Times New Roman", "fontWeight": 800, "fontSize": 17, "fontColor": "red"}},
{ start: 0, end: 22, name: "Strong promoter", direction: 1, border: "dashed", font: {fontFamily: "Times New Roman", fontWeight: 800, fontSize: 17, fontColor: 'blue'}},
svg: 'promoter'
];
```
here `promoter` matches the name of the promoter icon file `promoter.png`
- Annotation background color gradient. User can enter a starting color and stopping color:
```js
annotations = [
{ start: 0, end: 22, name: "Strong promoter", direction: 1, border: "dashed", font: {"fontFamily": "Times New Roman", "fontWeight": 800, "fontSize": 17, "fontColor": "red"}},
{ start: 0, end: 22, name: "Strong promoter", direction: 1, border: "dashed", font: {fontFamily: "Times New Roman", fontWeight: 800, fontSize: 17, fontColor: 'blue'}},
svg: 'promoter', gradient: {start: 'lightblue', stop: 'green'}
];
```

Example result of using optional annotation parameters:
```js
annotation['border'] = 'dashed';
annotation['font'] = {"fontFamily": "Times New Roman", "fontWeight": 800, "fontSize": 17, "fontColor": 'blue'}
annotation['font'] = {fontFamily: "Times New Roman", fontWeight: 800, fontSize: 17, fontColor: 'blue'}
annotation['svg'] = 'promoter'
annotation['gradient'] = {start: 'lightblue', stop: 'green'}
```
<br></br>
<img src="./demo/public/annotations-example.png" width="500" />

#### `primers (=[])`
Expand Down

0 comments on commit 0224fb3

Please sign in to comment.