Skip to content

Commit

Permalink
📝 comment dots in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
silencesys committed Feb 3, 2021
1 parent 9c2735b commit e2a6bc8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,27 +137,27 @@ is to use the `ref` attribute and then call the method `openOverlay` on the `$re
```
and then the method `openOverlay` can be called from your method:
```javascript
...
// ...
methods: {
// the index parameter is optional, however it should be set if you're opening
// the overlay on different position than the beginning of the gallery
openOverlayProgramaticallyWithContext (item, index = 0) {
this.$refs.silentbox.openOverlay(item, index)
}
}
...
// ...
```

However, in case you just want to open an item without any context, it might be a better choice to call the global `open`
method that SilentBox provides.
```javascript
...
// ...
methods: {
openOverlayProgramaticallyWithoutContext (item) {
this.$silentbox.open(item)
}
}
...
// ...
```

<br>
Expand Down

0 comments on commit e2a6bc8

Please sign in to comment.