How to use the dojo/topic.publish function in dojo

To help you get started, we’ve selected a few dojo 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 Esri / storymap-cascade / src / app / storymaps / tpl / view / section / TitleBuilder.jsx View on Github external
.then(newMedia => {
        if (SectionCommon.isSameMediaWithSecureProtocol(params.media, newMedia)) {
          // if all that's changed is that the media URL is now https, keep the existing media but change it to be https.
          // This preserves captions, alt media, and config options.
          params.media.convertToHttps();
          topic.publish('builder-should-check-story');
        }
        else {
          this._onEditMedia(params.media, newMedia);
        }
      },
      () => {
github Esri / storymap-cascade / src / app / storymaps / tpl / view / media / ImageBuilder.jsx View on Github external
this._image.dataUrl = null;
    }

    if (this._uploadNotification) {
      this._uploadNotification.update({
        type: 'success',
        label: text.media.mediaUploadSuccess
      });
    }

    this._isLoaded = false;

    // Preload the image so that there is no flashing
    this.preload().then(this.load.bind(this));

    topic.publish('builder-media-update');

    if (!this._isAlternate) {
      this._node.find('.img-gallery-invite').removeClass('disabled');
    }
  }
github Esri / storymap-cascade / src / app / storymaps / tpl / core / Controller.jsx View on Github external
if (! newSection || this._disableScrollEvents) {
      return;
    }

    newSection.onScroll(lang.mixin(params, {
      status: 'current',
      webSceneCache: this._webSceneCache
    }));

    // If changing section
    if (params.currentSectionIndex != this._currentSectionIndex) {
      // Activate new section
      params.$currentSection.addClass('active');

      // Dev event
      topic.publish('story-navigated-section', {
        index: params.currentSectionIndex,
        data: this._currentSection
      });

      //
      // Preload next section
      //

      var nextSection = this._sections[params.currentSectionIndex + 1];

      if (nextSection) {
        if (params.currentSectionIndex != this._currentSectionIndex) {
          this.preloadSection(nextSection, params);
        }
      }
github Esri / storymap-cascade / src / app / storymaps / tpl / builder / mediaPicker / browsePanel / sidePanel / FileUploader / FileUploader.jsx View on Github external
Object.assign(broadcastDetails, {uploadDeferred: fileDetails.uploadDeferred});
    }

    if (fileDetails.dataUrl) {
      Object.assign(broadcastDetails, {dataUrl: fileDetails.dataUrl});
    }

    if (fileDetails.url) {
      Object.assign(broadcastDetails, {url: fileDetails.url});
    }

    if (fileDetails.thumbUrl) {
      Object.assign(broadcastDetails, {thumbUrl: fileDetails.thumbUrl});
    }

    topic.publish('MEDIA-PICKER-SELECTION', broadcastDetails);
  }
github hpcc-systems / HPCC-Platform / esp / src / src / ws_machine.ts View on Github external
response.GetComponentStatusResponse.ComponentStatusList.ComponentStatus.forEach(function (row) {
                        topic.publish("hpcc/monitoring_component_update", {
                            response: response,
                            status: response.GetComponentStatusResponse.ComponentStatus
                        });
                    });
                }
github Esri / storymap-cascade / src / app / storymaps / tpl / view / section / SequenceBuilder.jsx View on Github external
_onContentChange() {
    this.serialize(false);
    topic.publish('builder-section-update');
  }
github Esri / storymap-cascade / src / app / storymaps / tpl / view / media / Media.jsx View on Github external
_onConfigChange() {
    topic.publish('builder-media-update');

    if (this._onConfigChangeCallback) {
      this._onConfigChangeCallback();
    }
  }
github Esri / storymap-cascade / src / app / storymaps / tpl / view / section / Immersive / ImmersiveBuilder.jsx View on Github external
_onContentChange() {
    this.serialize(false);
    topic.publish('builder-section-update');
  }
github Esri / storymap-cascade / src / app / storymaps / tpl / view / media / ImageGallery.jsx View on Github external
this._gallery.on('resize', () => {
        topic.publish('media-dynamic-resize');
      });
    });

dojo

Dojo core is a powerful, lightweight library that makes common tasks quicker and easier. Animate elements, manipulate the DOM, and query with easy CSS syntax, all without sacrificing performance.

BSD-3-Clause OR AFL-2.1
Latest version published 2 years ago

Package Health Score

59 / 100
Full package analysis