Skip to content

Commit

Permalink
Documentation and demo for multiline
Browse files Browse the repository at this point in the history
  • Loading branch information
jornetsimon committed Jun 26, 2020
1 parent 3bd0b64 commit 009759f
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ The config object should represent a partial [RoughAnnotationConfigB ase](https:
| color | `string` | See [Automatic colors](#automatic-colors) |
| strokeWidth | `number` | `1` |
| padding | `number`, `[number, number]`, `[number, number, number, number]` | `5` |
| multiline | `boolean` | `false` |
| iterations | `number` | `2` |
| brackets | `'left'`, `'right'`, `'top'`, `'bottom'`, [...`'left'`, `'right'`, `'top'`, `'bottom'`] | `'right'` |

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng-rough-notation-workspace",
"version": "1.0.5",
"version": "1.1.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
Expand Down
1 change: 1 addition & 0 deletions projects/demo/src/app/app.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
}
.section > div {
display: flex;
align-items: center;
font-size: 24px;
}
.section > div:not(:last-child) {
Expand Down
18 changes: 18 additions & 0 deletions projects/demo/src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,24 @@ <h2>Types</h2>
</span>
<button (click)="bracket.toggle()">Toggle</button>
</div>
<div>
<p style="max-width: 700px;">
<strong>Multiline</strong>
<br />
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam neque ante, tristique
eget sem eu, faucibus porta ex. Mauris in feugiat justo, vel aliquam nulla.
<span
[roughNotation]="{ type: 'highlight', multiline: true }"
#multiline="roughNotation"
>Nullam iaculis, massa dignissim ultrices tincidunt, urna mi varius mi, eget
consequat sapien arcu et mi. Praesent mauris arcu, imperdiet sit amet ultricies in,
posuere ut nisl.
</span>
Suspendisse faucibus mauris at arcu ullamcorper posuere. Morbi eget arcu quis lectus
feugiat vulputate. Sed nec pulvinar sem, ut posuere lacus.
</p>
<button (click)="multiline.toggle()">Toggle</button>
</div>
</div>

<h2>
Expand Down
1 change: 1 addition & 0 deletions projects/ng-rough-notation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ The config object should represent a partial [RoughAnnotationConfigB ase](https:
| color | `string` | See [Automatic colors](#automatic-colors) |
| strokeWidth | `number` | `1` |
| padding | `number`, `[number, number]`, `[number, number, number, number]` | `5` |
| multiline | `boolean` | `false` |
| iterations | `number` | `2` |
| brackets | `'left'`, `'right'`, `'top'`, `'bottom'`, [...`'left'`, `'right'`, `'top'`, `'bottom'`] | `'right'` |

Expand Down
2 changes: 1 addition & 1 deletion projects/ng-rough-notation/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng-rough-notation",
"version": "1.0.5",
"version": "1.1.0",
"description": "Angular directive wrapper for rough-notation",
"author": "Simon Jornet",
"keywords": [
Expand Down

0 comments on commit 009759f

Please sign in to comment.