Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  loader.js   Sprache: JAVA

 
import {Utilities} from '../util/utilities';

/**
 * This {Decorator} class is used to show / hide a loader on {Francy}.
 */

export default class LoaderDecorator {

  /**
   * Default Constructor
   * Decorators.Loader.withContext(this).show(); Decorators.Loader.withContext(this).hide();
   */

  constructor() {
    /**
     * Stores the loader ID
     * @type {string}
     */

    this.id = Utilities.generateId();
    /**
     * Stores the loader context
     * @type {Object}
     */

    this.context = undefined;
    /**
     * Stores the loader element
     * @type {Object}
     */

    this.element = undefined;
  }

  /**
   * This method stores the context where the loader will run.
   *
   * @public
   * @param {Object} ctx - the context where this function will run
   * @return {this} instance
   */

  withContext(ctx) {
    this.context = ctx;
    let loader = d3.select(`a.loader#Loader-${ctx.data ? ctx.data.canvas ? ctx.data.canvas.id : ctx.options.appendTo.id : ''}`);
    if (loader.node()) {
      this.element = loader;
    }
    return this;
  }

  /**
   * This method shows the loader on the screen.
   *
   * @public
   */

  show() {
    if (this.element && this.element.data()[0]) {
      this.element.data()[0][this.id] = true;
      this.element.style('visibility''visible');
    }
    return this;
  }

  /**
   * This method hides the loader on the screen.
   *
   * @public
   */

  hide() {
    if (this.element && this.element.data()[0]) {
      delete this.element.data()[0][this.id];
      // hide only if no more loaders present
      if (Object.values(this.element.data()[0]).length === 0) {
        this.element.style('visibility''hidden');
      }
    }
    return this;
  }
}

Messung V0.5
C=89 H=87 G=87

¤ Dauer der Verarbeitung: 0.12 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge