How to use the @bentley/ui-abstract.BadgeType.None function in @bentley/ui-abstract

To help you get started, we’ve selected a few @bentley/ui-abstract 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 imodeljs / imodeljs / plugins / hypermodeling / src / HyperModelingMarkers.ts View on Github external
const matrix = placement.matrix;
    const targetMatrix = matrix.multiplyMatrixMatrix(vp.rotation);
    const rotateTransform = Transform.createFixedPointAndMatrix(origin, targetMatrix);
    const startFrustum = vp.getFrustum();
    const newFrustum = startFrustum.clone();
    newFrustum.multiply(rotateTransform);
    if (startFrustum.equals(newFrustum))
      return;
    vp.view.setupFromFrustum(newFrustum);
    vp.synchWithView(true);
    vp.animateToCurrent(startFrustum);
  }

  public toolbarProps: AbstractToolbarProps = {
    items: [
      { label: HyperModelingPlugin.plugin!.i18n.translate("HyperModeling:Message.ToggleSection"), iconSpec: "icon-section-tool", badgeType: BadgeType.None, applicationData: "toggle_section", execute: () => { } },
      { label: HyperModelingPlugin.plugin!.i18n.translate("HyperModeling:Message.AlignSection"), iconSpec: "icon-image", badgeType: BadgeType.None, applicationData: "align_view", execute: () => { } },
      { label: HyperModelingPlugin.plugin!.i18n.translate("HyperModeling:Message.OpenSection"), iconSpec: "icon-import", badgeType: BadgeType.None, applicationData: "open_section", execute: () => { } },
    ],
  };

  public get overToolbarHotspot(): boolean { return this._isHilited; }
  public get toolbarLocation(): XAndY { return IModelApp.uiAdmin.createXAndY(this.rect.right, this.rect.top); }

  public onToolbarItemExecuted = (item: any) => {
    const vp = SectionLocationSetDecoration.sectionViewport();
    if (undefined === vp)
      return;

    switch (item.applicationData) {
      case "toggle_section": {
        this.toggleSection(vp); // tslint:disable-line:no-floating-promises
github imodeljs / imodeljs / plugins / hypermodeling / src / HyperModelingMarkers.ts View on Github external
const targetMatrix = matrix.multiplyMatrixMatrix(vp.rotation);
    const rotateTransform = Transform.createFixedPointAndMatrix(origin, targetMatrix);
    const startFrustum = vp.getFrustum();
    const newFrustum = startFrustum.clone();
    newFrustum.multiply(rotateTransform);
    if (startFrustum.equals(newFrustum))
      return;
    vp.view.setupFromFrustum(newFrustum);
    vp.synchWithView(true);
    vp.animateToCurrent(startFrustum);
  }

  public toolbarProps: AbstractToolbarProps = {
    items: [
      { label: HyperModelingPlugin.plugin!.i18n.translate("HyperModeling:Message.ToggleSection"), iconSpec: "icon-section-tool", badgeType: BadgeType.None, applicationData: "toggle_section", execute: () => { } },
      { label: HyperModelingPlugin.plugin!.i18n.translate("HyperModeling:Message.AlignSection"), iconSpec: "icon-image", badgeType: BadgeType.None, applicationData: "align_view", execute: () => { } },
      { label: HyperModelingPlugin.plugin!.i18n.translate("HyperModeling:Message.OpenSection"), iconSpec: "icon-import", badgeType: BadgeType.None, applicationData: "open_section", execute: () => { } },
    ],
  };

  public get overToolbarHotspot(): boolean { return this._isHilited; }
  public get toolbarLocation(): XAndY { return IModelApp.uiAdmin.createXAndY(this.rect.right, this.rect.top); }

  public onToolbarItemExecuted = (item: any) => {
    const vp = SectionLocationSetDecoration.sectionViewport();
    if (undefined === vp)
      return;

    switch (item.applicationData) {
      case "toggle_section": {
        this.toggleSection(vp); // tslint:disable-line:no-floating-promises
        break;