How to use the phovea_core/src/provenance.meta 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 / ordino / src / internal / cmds.ts View on Github external
export function createView(app: IObjectRef, viewId: string, idtype: IDType, selection: Range, options?): IAction {
  const view = getPlugin(EXTENSION_POINT_TDP_VIEW, viewId);
  // assert view
  return action(meta('Add ' + view.name, cat.visual, op.create), CMD_CREATE_VIEW, createViewImpl, [app], {
    viewId,
    idtype: idtype ? idtype.id : null,
    selection: selection ? selection.toString() : none().toString(),
    options
  });
}
github Caleydo / ordino / src / internal / cmds.ts View on Github external
export function setAndUpdateSelection(view: IObjectRef, target: IObjectRef, idtype: IDType, range: Range) {
  // assert view
  return action(meta('Select ' + (idtype ? idtype.name : 'None'), cat.selection, op.update), CMD_SET_SELECTION, setSelectionImpl, [view, target], {
    idtype: idtype ? idtype.id : null,
    range: range.toString()
  });
}
github Caleydo / ordino / src / internal / cmds.ts View on Github external
export function replaceView(app: IObjectRef, existingView: IObjectRef, viewId: string, idtype: IDType, selection: Range, options?): IAction {
  const view = getPlugin(EXTENSION_POINT_TDP_VIEW, viewId);
  // assert view
  return action(meta('Replace ' + existingView.name + ' with ' + view.name, cat.visual, op.update), CMD_REPLACE_VIEW, replaceViewImpl, [app, existingView], {
    viewId,
    idtype: idtype ? idtype.id : null,
    selection: selection ? selection.toString() : none().toString(),
    options
  });
}
github Caleydo / ordino / src / internal / cmds.ts View on Github external
export function setSelection(view: IObjectRef, idtype: IDType, range: Range) {
  // assert view
  return action(meta('Select ' + (idtype ? idtype.name : 'None'), cat.selection, op.update), CMD_SET_SELECTION, setSelectionImpl, [view], {
    idtype: idtype ? idtype.id : null,
    range: range.toString()
  });
}
github Caleydo / ordino / src / internal / cmds.ts View on Github external
export function removeView(app: IObjectRef, view: IObjectRef, oldFocus = -1): IAction {
  // assert view
  return action(meta('Remove ' + view.toString(), cat.visual, op.remove), CMD_REMOVE_VIEW, removeViewImpl, [app, view], {
    viewId: view.value.desc.id,
    focus: oldFocus
  });
}
github Caleydo / ordino / src / lineup / scorecmds.ts View on Github external
export function removeScore(provider:IObjectRef, scoreId: string, params: any, columnId: string|string[]) {
  return action(meta('Remove Score', cat.data, op.remove), CMD_REMOVE_SCORE, removeScoreImpl, [provider], {
    id: scoreId,
    params,
    columnId
  });
}
github Caleydo / ordino / src / lineup / scorecmds.ts View on Github external
export async function pushScoreAsync(graph: ProvenanceGraph, provider:IObjectRef, scoreId: string, params: any) {
  const actionParams = {id: scoreId, params};
  const result = await addScoreAsync([provider], actionParams);
  return graph.pushWithResult(action(meta('Add Score', cat.data, op.create), CMD_ADD_SCORE, addScoreImpl, [provider], actionParams), result);
}