How to use the phovea_core/src/event.fire function in phovea_core

To help you get started, we’ve selected a few phovea_core 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 Caleydo / lineage / src / graph.ts View on Github external
//if it's not already in there:
            if (this.tableManager.colOrder.filter((a: any) => { return a === arrayVector.desc.name; }).length < 1) {
              this.tableManager.colOrder = [arrayVector.desc.name].concat(this.tableManager.colOrder); // store array of names
            }

          });

          //clear out any attributes that aren't in the top 5
          // Add highly connected nodes to the adj Matrix:
          const allNodes = this.graph.nodes.slice(0).sort((a, b) => { return a.degree > b.degree ? -1 : 1; });
          const connectedNodes = allNodes.slice(0, 5);



          console.profileEnd();
          events.fire(TABLE_VIS_ROWS_CHANGED_EVENT);


        });
github Caleydo / taco / src / util.ts View on Github external
// remove timepoints that are already selected
  timepoints = timepoints.filter((d) => selectedTimePoints.indexOf(d) === -1);

  if (timepoints.length > 2) {
    timepoints = timepoints.slice(0, 2);
  }

  selectedTimePoints.push(...timepoints);

  // sort elements by time -> [0] = earlier = source; [1] = later = destination
  selectedTimePoints = selectedTimePoints.sort((a, b) => d3.ascending(a.time.toISOString(), b.time.toISOString()));

  hash.setProp(AppConstants.HASH_PROPS.TIME_POINTS, selectedTimePoints.map((d) => d.key).join(','));
  hash.removeProp(AppConstants.HASH_PROPS.DETAIL_VIEW);

  events.fire(AppConstants.EVENT_TIME_POINTS_SELECTED, selectedTimePoints);

  // clear after 2 selected time points
  if (selectedTimePoints.length === 2) {
    selectedTimePoints = [];
  }
}
github Caleydo / lineage / src / graph.ts View on Github external
'icon': 'Add2Matrix', 'string': removeAdjMatrix ? 'Remove from Table' : 'Add to Table', 'callback': () => {
                      events.fire(ADJ_MATRIX_CHANGED, { 'db': this.selectedDB, 'name': d.title, 'uuid': d.uuid, 'remove': removeAdjMatrix, 'nodes': this.graph.nodes.map((n) => n.uuid) });
                    },
github Caleydo / taco / src / bar_chart.ts View on Github external
.on('mouseleave', (d) => {
        events.fire(AppConstants.EVENT_TIME_POINT_HOVERED, d[1].time.toDate(), false);
      })
      .on('click', (d) => {
github Caleydo / taco / src / filter_bar.ts View on Github external
.on('click', function (selectedType) {
        const button = d3.select(this);

        if (button.classed('active')) {
          selectedType.isActive = false;
          events.fire(AppConstants.EVENT_HIDE_CHANGE, selectedType);
          ChangeTypes.updateFilterHash();
          button
            .classed('active', false)
            .classed('inactive', true);

        } else {
          selectedType.isActive = true;
          events.fire(AppConstants.EVENT_SHOW_CHANGE, selectedType);
          ChangeTypes.updateFilterHash();
          button
            .classed('active', true)
            .classed('inactive', false);
        }
      });
  }
github Caleydo / lineage / src / mapView.ts View on Github external
selectAll('.dropdown-item-map').on('mousedown', function (d) {
          event.preventDefault();
          //Check if is selected, if so remove from table.
          d = d.toString()

          if (self.currentSelectedMapAttribute!=d) {
            self.currentSelectedMapAttribute = d as string;
            selectAll('.dropdown-item-map').classed('active',false);
            select(this).classed('active', true);
            events.fire(MAP_ATTRIBUTE_CHANGE_EVENT,undefined)
          }
        });
github ConfusionFlow / confusionflow / src / DataStore.ts View on Github external
static remove(ds: MalevoDataset) {
    DataStoreSelectedRun.setSelectionIndex(dataStoreRuns.get(ds.name).selectionIndex, null);
    dataStoreRuns.delete(ds.name);
    if (dataStoreRuns.size === 0) {
      DataStoreCellSelection.deselect();
    }
    events.fire(AppConstants.EVENT_DATA_SET_REMOVED, ds);
    events.fire(AppConstants.EVENT_REDRAW);
  }
github Caleydo / lineage / src / graph.ts View on Github external
'icon': 'MakeRoot', 'string': 'Make Root', 'callback': () => {
                      events.fire(ROOT_CHANGED_EVENT, { 'root': d });
                    }
                  },
github Caleydo / vials / src / vials-junctions-v2.ts View on Github external
'mouseover'(d) {
          event.fire('sampleHighlight', d.w.sample, true);
          event.fire('highlightJxn', d3.select(this.parentNode).data()[0].key, true);
        },
        'mouseout'(d) {
github ConfusionFlow / confusionflow / src / DataStore.ts View on Github external
static toggleYScaling() {
    this._yScalingIsLinear = !this._yScalingIsLinear;
    events.fire(AppConstants.EVENT_WEIGHT_FACTOR_CHANGED, this.weightFactor);
  }