@fluxhub/fluxhub-lib 1.0.240 → 1.0.241

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.
@@ -13716,38 +13716,6 @@
13716
13716
  };
13717
13717
  this.u = null;
13718
13718
  this.already_open = false;
13719
- this.config_photo = {
13720
- btnClass: 'default',
13721
- // The CSS class(es) that will apply to the buttons
13722
- zoomFactor: 0.1,
13723
- // The amount that the scale will be increased by
13724
- containerBackgroundColor: '#ccc',
13725
- // The color to use for the background. This can provided in hex, or rgb(a).
13726
- wheelZoom: true,
13727
- // If true, the mouse wheel can be used to zoom in
13728
- allowFullscreen: false,
13729
- // If true, the fullscreen button will be shown, allowing the user to entr fullscreen mode
13730
- allowKeyboardNavigation: true,
13731
- // If true, the left / right arrow keys can be used for navigation
13732
- btnIcons: {
13733
- // The icon classes that will apply to the buttons. By default, font-awesome is used.
13734
- zoomIn: 'fa fa-plus',
13735
- zoomOut: 'fa fa-minus',
13736
- rotateClockwise: 'fa fa-repeat',
13737
- rotateCounterClockwise: 'fa fa-undo',
13738
- next: 'fa fa-arrow-right',
13739
- prev: 'fa fa-arrow-left',
13740
- fullscreen: 'fa fa-arrows-alt',
13741
- },
13742
- btnShow: {
13743
- zoomIn: false,
13744
- zoomOut: false,
13745
- rotateClockwise: false,
13746
- rotateCounterClockwise: false,
13747
- next: false,
13748
- prev: false
13749
- }
13750
- };
13751
13719
  this.config_photo_big = {
13752
13720
  btnClass: 'default',
13753
13721
  // The CSS class(es) that will apply to the buttons
@@ -13788,8 +13756,10 @@
13788
13756
  * @return {?}
13789
13757
  */
13790
13758
  function () {
13759
+ console.log('togglwe up');
13791
13760
  this.photo_c.src = [];
13792
13761
  this.photo_c.src.push(this.u.image_original[0]);
13762
+ this.photo_c.preview = false;
13793
13763
  this.config = this.config_photo_big;
13794
13764
  //this.photo_c.toggleFullscreen()
13795
13765
  this.already_open = true;
@@ -13803,7 +13773,7 @@
13803
13773
  function () {
13804
13774
  if (this.u != null)
13805
13775
  if (this.u.image_thumbnail != null)
13806
- if (this.u.image_thumbnail.length > 0 && this.preview && !this.already_open)
13776
+ if (this.u.image_thumbnail.length > 0 && this.photo_c.preview)
13807
13777
  this.toggle_up();
13808
13778
  };
13809
13779
  /**
@@ -13840,17 +13810,28 @@
13840
13810
  * @return {?}
13841
13811
  */
13842
13812
  function () {
13843
- this.config = this.config_photo_big;
13813
+ this.init();
13814
+ };
13815
+ /**
13816
+ * @return {?}
13817
+ */
13818
+ image_preview.prototype.init = /**
13819
+ * @return {?}
13820
+ */
13821
+ function () {
13844
13822
  this._preview_c = false;
13845
- if (!this.u)
13823
+ if (this.u != null)
13846
13824
  if (this.u.image_thumbnail != null)
13847
- if (this.u.image_thumbnail != this.u.image_original)
13848
- this._preview_c = true;
13825
+ if (this.u.image_thumbnail.length > 0)
13826
+ if (this.u.image_thumbnail[0] != this.u.image_original[0])
13827
+ this._preview_c = true;
13828
+ if (this.photo_c != null)
13829
+ this.photo_c.preview = this._preview_c;
13849
13830
  };
13850
13831
  image_preview.decorators = [
13851
13832
  { type: i0.Component, args: [{
13852
13833
  selector: 'image_preview',
13853
- template: "\n \n\n <div style=\"max-width:460px\"><fh-image-viewer [(preview)]=\"_preview_c\" (fullScreenEvent)=\"fullScreenEvent()\" [(ngModel)]=\"config\" *ngIf=\"u?.image_thumbnail?.length>0\" #photo_c (customEvent)=\"handleEvent($event)\" [src]=\"u.image_thumbnail\" index=\"0\"></fh-image-viewer>\n \n </div>\n",
13834
+ template: "\n \n<fh-image-viewer (init)=\"init()\" (fullScreenEvent)=\"fullScreenEvent()\" [config]=\"config_photo_big\" #photo_c [src]=\"u.image_thumbnail\" index=\"0\"></fh-image-viewer>\n \n\n",
13854
13835
  styles: ["\n\n "]
13855
13836
  }] }
13856
13837
  ];
@@ -13899,6 +13880,7 @@
13899
13880
  this.preview = false;
13900
13881
  this.indexChange = new i0.EventEmitter();
13901
13882
  this.configChange = new i0.EventEmitter();
13883
+ this.init = new i0.EventEmitter();
13902
13884
  this.fullScreenEvent = new i0.EventEmitter();
13903
13885
  this.style = { transform: '', msTransform: '', oTransform: '', webkitTransform: '' };
13904
13886
  this.fullscreen = false;
@@ -13921,6 +13903,7 @@
13921
13903
  var merged = this.mergeConfig(DEFAULT_CONFIG, this.moduleConfig);
13922
13904
  this.config = this.mergeConfig(merged, this.config);
13923
13905
  this.triggerConfigBinding();
13906
+ this.init.emit();
13924
13907
  };
13925
13908
  /**
13926
13909
  * @param {?} event
@@ -14192,6 +14175,7 @@
14192
14175
  config: [{ type: i0.Input }],
14193
14176
  indexChange: [{ type: i0.Output }],
14194
14177
  configChange: [{ type: i0.Output }],
14178
+ init: [{ type: i0.Output }],
14195
14179
  fullScreenEvent: [{ type: i0.Output }],
14196
14180
  nextImage: [{ type: i0.HostListener, args: ['window:keyup.ArrowRight', ['$event'],] }],
14197
14181
  prevImage: [{ type: i0.HostListener, args: ['window:keyup.ArrowLeft', ['$event'],] }],