Commit a8d2667
authored
Support for embedding plotlywidget instances that use numpy arrays (#1117)
* Null out _js2py properties after touch() so they don't end up in the saved model
* Added TypedArray js serialization to support saving embedded widget state.
For some reason, this required renaming 'buffer' in the
array representation object. Perhaps a conflict with naming conventions
in ipywidgets. So the buffers are now stored in property named `value`
* Several dynamic resizing improvements
- Render initial empty figure on 'before-attach' event. This
keeps the figure view from collapsing when opening a classic
notebook that was saved with embedded widget state
- Autoresize width even if height has been explicitly set
- Autoresize in the classic notebook by responding to window
resize events.
* Revert change to Python serializer.
If the new plotlywidget can work with current version of plotly.py then
we can put out a patch release of the widget only.
* Have plotlywidget accept multiple typed array representations
The buffer is named `buffer` when sent from plotly.py<=3.1.1,
but it is named `value` when restoring from saved widget state and when
receiving updates from plotly.py>=3.2.
* Emit ''plotlywidget-after-render' event when the widget has
finished rendering.
* Updated version to 0.2.2-rc.1 and published to npm
* Convert dispatch 'plotlywidget-after-render' to CustomEvent
dispatched on the document
* Version 0.2.2-rc.2 published to npm.1 parent 7767b44 commit a8d2667
3 files changed
+91
-15
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
743 | 743 | | |
744 | 744 | | |
745 | 745 | | |
746 | | - | |
747 | 746 | | |
748 | 747 | | |
749 | 748 | | |
| |||
786 | 785 | | |
787 | 786 | | |
788 | 787 | | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
789 | 796 | | |
790 | 797 | | |
791 | 798 | | |
| |||
796 | 803 | | |
797 | 804 | | |
798 | 805 | | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
799 | 822 | | |
| 823 | + | |
| 824 | + | |
800 | 825 | | |
| 826 | + | |
801 | 827 | | |
802 | 828 | | |
803 | | - | |
804 | | - | |
805 | | - | |
806 | | - | |
807 | | - | |
808 | | - | |
809 | | - | |
810 | | - | |
811 | | - | |
| 829 | + | |
812 | 830 | | |
813 | 831 | | |
814 | 832 | | |
815 | 833 | | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
816 | 847 | | |
817 | 848 | | |
818 | 849 | | |
| |||
996 | 1027 | | |
997 | 1028 | | |
998 | 1029 | | |
| 1030 | + | |
999 | 1031 | | |
1000 | 1032 | | |
1001 | 1033 | | |
| |||
1026 | 1058 | | |
1027 | 1059 | | |
1028 | 1060 | | |
| 1061 | + | |
1029 | 1062 | | |
1030 | 1063 | | |
1031 | 1064 | | |
| |||
1059 | 1092 | | |
1060 | 1093 | | |
1061 | 1094 | | |
| 1095 | + | |
1062 | 1096 | | |
1063 | 1097 | | |
1064 | 1098 | | |
| |||
1123 | 1157 | | |
1124 | 1158 | | |
1125 | 1159 | | |
| 1160 | + | |
1126 | 1161 | | |
1127 | 1162 | | |
1128 | 1163 | | |
| |||
1355 | 1390 | | |
1356 | 1391 | | |
1357 | 1392 | | |
| 1393 | + | |
1358 | 1394 | | |
1359 | 1395 | | |
1360 | 1396 | | |
| |||
1386 | 1422 | | |
1387 | 1423 | | |
1388 | 1424 | | |
| 1425 | + | |
1389 | 1426 | | |
1390 | 1427 | | |
1391 | 1428 | | |
| |||
1405 | 1442 | | |
1406 | 1443 | | |
1407 | 1444 | | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
1408 | 1475 | | |
1409 | 1476 | | |
1410 | 1477 | | |
1411 | 1478 | | |
1412 | 1479 | | |
1413 | 1480 | | |
1414 | | - | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
1415 | 1484 | | |
1416 | 1485 | | |
1417 | 1486 | | |
| |||
1450 | 1519 | | |
1451 | 1520 | | |
1452 | 1521 | | |
1453 | | - | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
1454 | 1525 | | |
1455 | 1526 | | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
1456 | 1531 | | |
1457 | | - | |
| 1532 | + | |
| 1533 | + | |
1458 | 1534 | | |
1459 | 1535 | | |
1460 | 1536 | | |
| |||
0 commit comments