mirror of
https://github.com/anyproto/anytype-ts.git
synced 2025-06-10 18:10:54 +09:00
JS-2877: fix
This commit is contained in:
parent
81c2af0cf8
commit
992f0c673b
2 changed files with 3 additions and 9 deletions
1
dist/embed/iframe.html
vendored
1
dist/embed/iframe.html
vendored
|
@ -21,6 +21,7 @@
|
|||
|
||||
.twitter-tweet, .instagram-media { margin: 0px !important; display: inline-flex !important; }
|
||||
.gist-file { margin: 0px !important; }
|
||||
.cp_embed_iframe { border: 0px !important; }
|
||||
|
||||
html.align1 .twitter-tweet, body.align1 .instagram-media { justify-content: center; }
|
||||
html.align2 .twitter-tweet, body.align2 .instagram-media { justify-content: flex-end; }
|
||||
|
|
|
@ -10,7 +10,6 @@ const BlockBookmark = observer(class BlockBookmark extends React.Component<I.Blo
|
|||
|
||||
_isMounted = false;
|
||||
node: any = null;
|
||||
frame = 0;
|
||||
|
||||
constructor (props: I.BlockComponent) {
|
||||
super(props);
|
||||
|
@ -262,11 +261,7 @@ const BlockBookmark = observer(class BlockBookmark extends React.Component<I.Blo
|
|||
};
|
||||
|
||||
resize () {
|
||||
if (this.frame) {
|
||||
raf.cancel(this.frame);
|
||||
};
|
||||
|
||||
this.frame = raf(() => {
|
||||
window.setTimeout(() => {
|
||||
if (!this._isMounted) {
|
||||
return;
|
||||
};
|
||||
|
@ -274,10 +269,8 @@ const BlockBookmark = observer(class BlockBookmark extends React.Component<I.Blo
|
|||
const { getWrapperWidth } = this.props;
|
||||
const node = $(this.node);
|
||||
const inner = node.find('.inner');
|
||||
const rect = (node.get(0) as Element).getBoundingClientRect();
|
||||
const mw = getWrapperWidth();
|
||||
|
||||
rect.width <= mw / 2 ? inner.addClass('vertical') : inner.removeClass('vertical');
|
||||
inner.width() <= getWrapperWidth() / 2 ? inner.addClass('vertical') : inner.removeClass('vertical');
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue