Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.0.4 #30

Merged
merged 5 commits into from
Oct 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,17 @@ $ python usage.py

Integration tests for the component can be found in `tests/`

`$pytest --headless tests`
```bash
$pytest --headless tests
```

(note: the `--headless` param runs tests without the GUI)

### Create a production build and publish:

```bash
$ npm run build
$ rm -rf dist
$ npm run build
$ python setup.py sdist bdist_wheel
$ twine upload dist/*
$ npm publish
Expand Down
2 changes: 1 addition & 1 deletion dash_extendable_graph/dash_extendable_graph.dev.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dash_extendable_graph/dash_extendable_graph.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dash_extendable_graph/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dash_extendable_graph",
"version": "1.0.3",
"version": "1.0.4",
"description": "plotly-dash custom component. Adds Plotly.extendTraces() support to dash_core_components.Graph()",
"homepage": "https://github.com/bcliang/dash-extendable-graph",
"main": "build/index.js",
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": "dash_extendable_graph",
"version": "1.0.3",
"version": "1.0.4",
"description": "plotly-dash custom component. Adds Plotly.extendTraces() support to dash_core_components.Graph()",
"homepage": "https://github.com/bcliang/dash-extendable-graph",
"main": "build/index.js",
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# dash is required to call `build:py`
dash>=1.0.2
dash>=1.4.1
11 changes: 5 additions & 6 deletions src/lib/components/ExtendableGraph.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,9 @@ class ExtendableGraph extends Component {
const gd = this.gd.current;
if (gd && gd.removeAllListeners) {
gd.removeAllListeners();
Plotly.purge(gd);
if (this._hasPlotted) {
Plotly.purge(gd);
}
}
window.removeEventListener('resize', this.graphResize);
}
Expand All @@ -281,14 +283,11 @@ class ExtendableGraph extends Component {
return;
}

const figureChanged = this.props.figure !== nextProps.figure;
if (figureChanged) {
if (this.props.figure !== nextProps.figure) {
this.plot(nextProps);
}

const extendDataChanged =
this.props.extendData !== nextProps.extendData;
if (extendDataChanged) {
if (this.props.extendData !== nextProps.extendData) {
this.extend(nextProps);
}
}
Expand Down
3 changes: 0 additions & 3 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@

chromedriver-binary==76.0.3809.126
dash[testing]
pytest>=5.1.1
ipdb
percy
selenium
flake8
pylint