How to use the igniteui-angular.CloseScrollStrategy function in igniteui-angular

To help you get started, we’ve selected a few igniteui-angular examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github IgniteUI / crypto-portfolio-app / src / app / portfolio / portfolio.component.ts View on Github external
this.snack.show();
   }

   public updateRow(evt) {
      const rowItem = evt.rowID;
      rowItem.holdings = evt.newValue;

      this.updateItem(rowItem);
   }

// tslint:disable-next-line: member-ordering
   private _dialogOverlaySettings = {
      closeOnOutsideClick: true,
      modal: true,
      outlet: this.outlet,
      scrollStrategy: new CloseScrollStrategy()
   };


   private positive24h = (rowData: any): boolean => {
      return rowData.changePct24Hour > 0;
   }
   private negative24h = (rowData: any): boolean => {
      return rowData.changePct24Hour < 0;
   }

   // tslint:disable-next-line:member-ordering
   public dailyChanges = {
      positive: this.positive24h,
      negative: this.negative24h
   };
github IgniteUI / crypto-portfolio-app / src / app / statistics / statistics.component.ts View on Github external
this.getAndTransformData();
      this.chart.overlayTypes.add(FinancialOverlayType.PriceChannel);
   }

   // tslint:disable-next-line: member-ordering
   private _dropdownPositionSettings = {
      horizontalStartPoint: HorizontalAlignment.Left,
      verticalStartPoint: VerticalAlignment.Bottom
   };

   // tslint:disable-next-line: member-ordering
   private _dropDownOverlaySettings = {
      closeOnOutsideClick: true,
      modal: false,
      positionStrategy: new ConnectedPositioningStrategy(this._dropdownPositionSettings),
      scrollStrategy: new CloseScrollStrategy()
   };



   public toggleDropDown(eventArgs, selectedDropDown: IgxDropDownComponent) {
      const dropDown = selectedDropDown;
      this._dropDownOverlaySettings.positionStrategy.settings.target = eventArgs.target;
      dropDown.toggle(this._dropDownOverlaySettings);
   }

   public getData(event?: any) {
      let coin: any;

      if (event) {
         const name = event.item.elementRef.nativeElement.innerText;
         const symbol = name.substring(name.search('[[]') + 1, name.length - 1);
github IgniteUI / igniteui-angular-samples / src / app / grid-crm / grid-crm / grid-crm.component.ts View on Github external
public pinnedColsLength: number;

    public searchText: string = "";
    public caseSensitive: boolean = false;

    public _positionSettings: PositionSettings = {
        horizontalDirection: HorizontalAlignment.Left,
        horizontalStartPoint: HorizontalAlignment.Right,
        verticalStartPoint: VerticalAlignment.Bottom
    };

    public _overlaySettings: OverlaySettings = {
        closeOnOutsideClick: true,
        modal: false,
        positionStrategy: new ConnectedPositioningStrategy(this._positionSettings),
        scrollStrategy: new CloseScrollStrategy()
    };

    private frmt: Intl.DateTimeFormat;

    constructor(private excelExporterService: IgxExcelExporterService) { }

    public ngOnInit() {
        const employees = data;
        for (const employee of employees) {
            this.getDeals(employee);
        }
        this.localData = employees;
    }

    public toggleHiding() {
        this._overlaySettings.positionStrategy.settings.target = this.hidingButton.nativeElement;
github IgniteUI / igniteui-angular-samples / src / app / theming / theme-chooser / theme-chooser-sample.component.ts View on Github external
horizontalStartPoint: HorizontalAlignment.Left,
        verticalStartPoint: VerticalAlignment.Bottom
    };

    private _dropDownOverlaySettings = {
        closeOnOutsideClick: true,
        modal: false,
        positionStrategy: new ConnectedPositioningStrategy(this._dropdownPositionSettings),
        scrollStrategy: new CloseScrollStrategy()
    };

    private _dialogOverlaySettings2 = {
        closeOnOutsideClick: true,
        modal: true,
        outlet: this.outlet,
        scrollStrategy: new CloseScrollStrategy()
    };

    constructor() { }

    public selectTheme(value: THEME) {
        this.themesClass = value;
    }

    public toggleDropDown(eventArgs, selectedDropDown: IgxDropDownComponent) {
        const dropDown = selectedDropDown;
        this._dropDownOverlaySettings.positionStrategy.settings.target = eventArgs.target;
        dropDown.toggle(this._dropDownOverlaySettings);
    }

    public addRow() {
        this.grid1.addRow(this.record);
github IgniteUI / warehouse-js-blocks / src / app / addorder / addorder.component.ts View on Github external
}

    backButtonClicked() {
        this.location.back();
    }

    private _positionSettings = {
        horizontalStartPoint: HorizontalAlignment.Left,
        verticalStartPoint: VerticalAlignment.Bottom
    };

    private _overlaySettings = {
        closeOnOutsideClick: true,
        modal: false,
        positionStrategy: new ConnectedPositioningStrategy(this._positionSettings),
        scrollStrategy: new CloseScrollStrategy()
    };

    public toggleDropDown(eventArgs) {
        this._overlaySettings.positionStrategy.settings.target = eventArgs.target;
        this.igxDropDown.toggle(this._overlaySettings);
    }

    get selectOrderButtonCaption(): string {
        if (this.ordersAvailable == null || this.ordersAvailable.length == 0) {
            return this.translate.instant("lblNoOrders");
        } else {
            if (this.selectedOrderId == null) {
                return this.translate.instant("lblSelectOrder");
            } else {
                return this.selectedOrderId;
            }
github IgniteUI / igniteui-angular-samples / src / app / interactions / overlay / overlay-scroll-2 / overlay-scroll-sample-2.component.ts View on Github external
public onClickScrollStrategy(strategy: string) {
        let scrollStrategy;
        const positionStrategy = new ConnectedPositioningStrategy();
        switch (strategy) {
            case ("absolute"):
                scrollStrategy = new AbsoluteScrollStrategy();
                positionStrategy.settings.target = this.scrollDemo.nativeElement.children[0];
                break;
            case ("block"):
                scrollStrategy = new BlockScrollStrategy();
                positionStrategy.settings.target = this.scrollDemo.nativeElement.children[1];
                break;
            case ("close"):
                scrollStrategy = new CloseScrollStrategy(this.mainContainer.nativeElement);
                positionStrategy.settings.target = this.scrollDemo.nativeElement.children[2];
                break;
            default:
                scrollStrategy = new NoOpScrollStrategy();
                positionStrategy.settings.target = this.scrollDemo.nativeElement.children[3];
        }
        this.overlay.show(this.overlayId, {
            positionStrategy,
            scrollStrategy,
            modal: false,
            closeOnOutsideClick: true
        });
    }
github IgniteUI / igniteui-angular-samples / src / app / theming / default-theme-sample / default-theme-sample.component.ts View on Github external
horizontalStartPoint: HorizontalAlignment.Left,
        verticalStartPoint: VerticalAlignment.Bottom
    };

    private _dropDownOverlaySettings = {
        closeOnOutsideClick: true,
        modal: false,
        positionStrategy: new ConnectedPositioningStrategy(this._dropdownPositionSettings),
        scrollStrategy: new CloseScrollStrategy()
    };

    private _dialogOverlaySettings2 = {
        closeOnOutsideClick: true,
        modal: true,
        outlet: this.outlet,
        scrollStrategy: new CloseScrollStrategy()
    };

    constructor() { }

    public toggleDropDown(eventArgs, selectedDropDown: IgxDropDownComponent) {
        const dropDown = selectedDropDown;
        this._dropDownOverlaySettings.positionStrategy.settings.target = eventArgs.target;
        dropDown.toggle(this._dropDownOverlaySettings);
    }

    public addRow() {
        this.grid1.addRow(this.record);
        this.cancel();
    }

    public cancel() {
github IgniteUI / igniteui-angular-samples / src / app / theming / dark-theme-sample / dark-theme-sample.component.ts View on Github external
horizontalStartPoint: HorizontalAlignment.Left,
      verticalStartPoint: VerticalAlignment.Bottom
  };

  private _dropDownOverlaySettings = {
      closeOnOutsideClick: true,
      modal: false,
      positionStrategy: new ConnectedPositioningStrategy(this._dropdownPositionSettings),
      scrollStrategy: new CloseScrollStrategy()
  };

  private _dialogOverlaySettings2 = {
      closeOnOutsideClick: true,
      modal: true,
      outlet: this.outlet,
      scrollStrategy: new CloseScrollStrategy()
  };

  constructor() { }

  public toggleDropDown(eventArgs, selectedDropDown: IgxDropDownComponent) {
      const dropDown = selectedDropDown;
      this._dropDownOverlaySettings.positionStrategy.settings.target = eventArgs.target;
      dropDown.toggle(this._dropDownOverlaySettings);
  }

  public addRow() {
      this.grid1.addRow(this.record);
      this.cancel();
  }

  public cancel() {
github IgniteUI / igniteui-angular-samples / src / app / overlay / overlay-main / overlay-sample.component.ts View on Github external
public onClickScrollStrategy(event: Event, strat: string) {
        event.stopPropagation();
        let scrollStrategy;
        switch (strat) {
            case ("absolute"):
                scrollStrategy = new AbsoluteScrollStrategy();
                break;
            case ("block"):
                scrollStrategy = new BlockScrollStrategy();
                break;
            case ("close"):
                scrollStrategy = new CloseScrollStrategy(this.mainContainer.nativeElement);
                break;
            default:
                scrollStrategy = new NoOpScrollStrategy();
        }
        const showSettings = Object.assign(Object.assign({}, this._overlaySettings), {
            scrollStrategy,
            modal: false
        });
        this.overlay.show(this.overlayDemo, showSettings);
    }
github IgniteUI / igniteui-angular-samples / src / app / interactions / toggle / toggle.component.ts View on Github external
selector: "app-toggle",
  styleUrls: ["./toggle.component.scss"],
  templateUrl: "./toggle.component.html"
})
export class ToggleComponent {
    @ViewChild(IgxToggleDirective) public igxToggle: IgxToggleDirective;
    @ViewChild("button") public igxButton: ElementRef;
    public _positionSettings = {
        horizontalStartPoint: HorizontalAlignment.Left,
        verticalStartPoint: VerticalAlignment.Bottom
    };
    public _overlaySettings = {
        closeOnOutsideClick: false,
        modal: false,
        positionStrategy: new ConnectedPositioningStrategy(this._positionSettings),
        scrollStrategy: new CloseScrollStrategy()
    };
    public toggle() {
        this._overlaySettings.positionStrategy.settings.target = this.igxButton.nativeElement;
        this.igxToggle.toggle(this._overlaySettings);
    }
}