@firestitch/block-editor 12.3.12 → 12.3.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
1
  import { AfterContentInit, ChangeDetectorRef, ElementRef, OnDestroy, OnInit } from '@angular/core';
2
2
  import { FsZoomPanComponent } from '@firestitch/zoom-pan';
3
3
  import Moveable from 'moveable';
4
- import { BlockEditorService, GoogleFontService } from './../../services';
5
- import { Block } from './../../interfaces';
6
4
  import { BlockType } from '../../enums';
5
+ import { Block } from './../../interfaces';
6
+ import { BlockEditorService, GoogleFontService } from './../../services';
7
7
  import * as i0 from "@angular/core";
8
8
  export declare class FsBlockComponent implements OnDestroy, AfterContentInit, OnInit {
9
9
  private _blockEditor;
@@ -552,7 +552,7 @@
552
552
  }
553
553
  rxjs.from(fsFile.imageInfo)
554
554
  .pipe(operators.switchMap(function (imageInfo) {
555
- if (imageInfo) {
555
+ if ((imageInfo === null || imageInfo === void 0 ? void 0 : imageInfo.height) && (imageInfo === null || imageInfo === void 0 ? void 0 : imageInfo.width)) {
556
556
  var ratio = imageInfo.height / imageInfo.width;
557
557
  block.width = _this._config.width * .4;
558
558
  block.height = block.width * ratio;
@@ -1145,6 +1145,11 @@
1145
1145
  _this.clippable = clippable;
1146
1146
  _this._cdRef.markForCheck();
1147
1147
  });
1148
+ this._blockEditor.blockAdded$
1149
+ .pipe(operators.takeUntil(this._destroy$))
1150
+ .subscribe(function () {
1151
+ _this._cdRef.markForCheck();
1152
+ });
1148
1153
  this._blockEditor.blockChanged$
1149
1154
  .pipe(operators.filter(function (block) { return block === _this.block; }), operators.takeUntil(this._destroy$))
1150
1155
  .subscribe(function (block) {