Skip to content

Commit 4436f3c

Browse files
add bullets and codepen example
1 parent fb52fe7 commit 4436f3c

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

snapshot.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,20 @@ Are there reference points from other libraries that we could mimic or learn fro
2525
`Plotly.Snapshot.clone` already has thumbnail ability by specifying [options tileClass:"thumbnail"](https://github.com/plotly/plotly.js/blob/master/src/snapshot/cloneplot.js#L76).
2626

2727

28-
`Plotly.Snapshot.clone` could be used to resize by adding this to `options` when/if we use `Plotly.plot` with our cloned `div`. We could also dynamically show a resulting view in a modal or something similar and adjust with `Plotly.relayout`.
28+
- `Plotly.Snapshot.clone` could be used to resize by adding this to `options` when/if we use `Plotly.plot` with our cloned `div`. We could also dynamically show a resulting view in a modal or something similar and adjust with `Plotly.relayout`.
2929

30-
`Plotly.Snapshot.clone` by default sets `staticPlot:true` in `config`.
31-
32-
A very basic way to attach this assuming there is a modebar would be to do something like this.
30+
- `Plotly.Snapshot.clone` by default sets `staticPlot:true` in `config`.
3331

32+
- A very basic way to attach this assuming there is a modebar would be to do something like this. See [codepen](http://codepen.io/timelyportfolio/pen/ZWvyYM).
3433
```
35-
gd._toImage = function(){this._fullLayout._modeBar.buttons.filter(function(btn){return btn[0].name==="toImage"})[0][0].click(this)}
34+
gd._toImage = function(){
35+
this._fullLayout._modeBar.buttons.filter(
36+
function(btn){return btn[0].name==="toImage"
37+
})[0][0].click(this)
38+
}
3639
```
3740

41+
- Quick code to experiment from R
3842
```
3943
library(plotly)
4044

0 commit comments

Comments
 (0)