Commit 25482da
authored
Don't apply relayout operations to the view that originated the event (GH1086) (#1094)
* Don't apply relayout operations to the view that originated the event
This fixes a zoom stutter that occurred on scroll zoom of 3d plots
* When computing overlapping properties to remove, don't leave empty objects.
Before, while scroll zooming on scatter3d trace with multiple views we'd sometimes end up with a _props state of:
{'up': {'x': -0.4, 'y': -0.4, 'z': 0.8},
'center': {'x': 0, 'y': 0, 'z': 0},
'eye': {}}
When this happened, accessing a sub-property of eye would always return none, even though values existed in the _prop_defaults dict.
e.g. fig.layout.scene.camera.eye.x would return None because the eye dict in _props was empty.
Now we just remove the eye property as well if all of it's own properties have been removed:
{'up': {'x': -0.4, 'y': -0.4, 'z': 0.8},
'center': {'x': 0, 'y': 0, 'z': 0}}1 parent 313129b commit 25482da
2 files changed
+9
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1248 | 1248 | | |
1249 | 1249 | | |
1250 | 1250 | | |
1251 | | - | |
1252 | | - | |
| 1251 | + | |
| 1252 | + | |
1253 | 1253 | | |
1254 | 1254 | | |
| 1255 | + | |
1255 | 1256 | | |
1256 | 1257 | | |
1257 | 1258 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
814 | 814 | | |
815 | 815 | | |
816 | 816 | | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
817 | 823 | | |
818 | 824 | | |
819 | 825 | | |
| |||
0 commit comments