Update index.ts
This commit is contained in:
parent
7f08459702
commit
81d9454585
|
@ -256,12 +256,14 @@ class ImageComponent extends Card<ImageValue> {
|
|||
if (this.type === CardType.BLOCK && this.image) {
|
||||
const maxWidth = this.image.getMaxWidth();
|
||||
const offset = (maxWidth - this.image.root.width()) / 2;
|
||||
this.toolbarModel?.setOffset([
|
||||
-offset - 12,
|
||||
0,
|
||||
-offset - 12,
|
||||
0,
|
||||
]);
|
||||
if (value.status === 'done') {
|
||||
this.toolbarModel?.setOffset([
|
||||
-offset - 12,
|
||||
0,
|
||||
-offset - 12,
|
||||
0,
|
||||
]);
|
||||
}
|
||||
if (this.activated)
|
||||
this.toolbarModel?.showCardToolbar();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue