Commit ed8b31c
committed
fire 'importannotations' on comments import and add listener in ViewLayoutWriter
ViewLayoutWriter listens for zoom, resize and annotation events and
based on that centers the document if there are any comments and
a possibility of bringing them into the view by adjusting margins.
but if the window is just wide enough to show the comments and the
document, and we reload the document, the resize event doesn't find
any comments (as they haven't been imported by then). thus the comments
are half visible/ cut-off.
this isn't noticable when the sidebar is not collapsed as the sidebar
appears after the comments have been imported and it invalidates the
view which fires 'resize' which ViewLayoutWriter listens for.
here we fire an event 'importannotations' after importing the comments
in writer and then the document adjusts it's horizontal position to
bring comments into the view.
Signed-off-by: Sahil Gautam <[email protected]>
Change-Id: Ice393ec507de6a1b79fc7cd4aa0bb21abf447ee21 parent 31c4756 commit ed8b31c
File tree
2 files changed
+2
-0
lines changed- browser/src
- app
- layer/tile
2 files changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| |||
0 commit comments