Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: man-group/PyBloqs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: quangduong109/Quangdv3_PyBloqs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.

Commits on Sep 13, 2021

  1. fix plotly export html

    quangduong109 committed Sep 13, 2021
    Copy the full SHA
    5de3a8f View commit details
  2. fix plotly export html

    quangduong109 committed Sep 13, 2021
    Copy the full SHA
    206b2d3 View commit details
  3. fix plotly export html

    quangduong109 committed Sep 13, 2021
    Copy the full SHA
    7a086b8 View commit details
  4. fix plotly export html

    quangduong109 committed Sep 13, 2021
    Copy the full SHA
    93e19cb View commit details
  5. fix plotly export html

    quangduong109 committed Sep 13, 2021
    Copy the full SHA
    e51de23 View commit details
  6. fix plotly export html

    quangduong109 committed Sep 13, 2021
    Copy the full SHA
    bf57a68 View commit details
  7. fix plotly export html

    quangduong109 committed Sep 13, 2021
    Copy the full SHA
    770672b View commit details
  8. fix plotly export html

    quangduong109 committed Sep 13, 2021
    Copy the full SHA
    2b92e79 View commit details
  9. fix plotly export html

    quangduong109 committed Sep 13, 2021
    Copy the full SHA
    6d3ef27 View commit details
  10. fix plotly export html

    quangduong109 committed Sep 13, 2021
    Copy the full SHA
    5a857bd View commit details
  11. fix plotly export html

    quangduong109 committed Sep 13, 2021
    Copy the full SHA
    6320d7b View commit details
  12. fix plotly export html

    quangduong109 committed Sep 13, 2021
    Copy the full SHA
    df4ca80 View commit details
  13. fix plotly export html

    quangduong109 committed Sep 13, 2021
    Copy the full SHA
    2333924 View commit details
  14. fix plotly export html

    quangduong109 committed Sep 13, 2021
    Copy the full SHA
    dd58c7f View commit details
  15. fix plotly export html

    quangduong109 committed Sep 13, 2021
    Copy the full SHA
    296af64 View commit details
  16. fix plotly export html

    quangduong109 committed Sep 13, 2021
    Copy the full SHA
    efab20d View commit details
  17. fix plotly export html

    quangduong109 committed Sep 13, 2021
    Copy the full SHA
    adc00dc View commit details
  18. Copy the full SHA
    ad6cd02 View commit details
  19. Copy the full SHA
    856baaf View commit details

Commits on Oct 20, 2021

  1. update pipy publish

    quangduong109 committed Oct 20, 2021
    Copy the full SHA
    8304bdc View commit details

Commits on Oct 29, 2021

  1. Copy the full SHA
    27016f0 View commit details

Commits on Oct 30, 2021

  1. Merge remote-tracking branch 'origin/master'

    # Conflicts:
    #	setup.py
    quangduong109 committed Oct 30, 2021
    Copy the full SHA
    e9c796d View commit details
  2. Copy the full SHA
    b47c0de View commit details
  3. Copy the full SHA
    74b49c2 View commit details
Showing with 5 additions and 2 deletions.
  1. +5 −2 pybloqs/block/image.py
7 changes: 5 additions & 2 deletions pybloqs/block/image.py
Original file line number Diff line number Diff line change
@@ -261,8 +261,11 @@ def __init__(self, contents, plotly_kwargs=None, **kwargs):
raise ValueError("Expected plotly.graph_objs.graph_objs.Figure type but got %s", type(contents))

plotly_kwargs = plotly_kwargs or {}
prefix = "<script>if (typeof require !== 'undefined') {var Plotly=require('plotly')}</script>"
self._contents = prefix + po.plot(contents, include_plotlyjs=False, output_type='div', **plotly_kwargs)
# prefix = "<script>if (typeof require !== 'undefined' && Plotly) {var Plotly = require('plotly')}</script>"
data_html = po.plot(contents, include_plotlyjs=False, output_type='div', **plotly_kwargs)
data_html = data_html.replace("window.PLOTLYENV=window.PLOTLYENV", "require(['plotly'], function (Plotly){ window.PLOTLYENV = window.PLOTLYENV").replace("</script>", "})</script>")

self._contents = data_html

def _write_contents(self, container, *args, **kwargs):
container.append(parse(self._contents))