How to use the type.AppFileLink.all function in type

To help you get started, we’ve selected a few type 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 basisjs / basisjs / src / devpanel / view / file-graph / view / graph / index.js View on Github external
(function(){
  var links = FileLink.all.getValues(function(link){
    return [link.data.from, link.data.to];
  });

  File.all.addHandler({
    itemsChanged: function(dataset, delta){
      if (delta.deleted)
        delta.deleted.forEach(function(file){
          graph.removeNode(file.getId());
        });
    }
  });

  FileLink.all.addHandler({
    itemsChanged: function(dataset, delta){
      if (delta.inserted)
        delta.inserted.forEach(function(link){
github basisjs / basisjs / src / devpanel / view / file-graph / view / graph / index.js View on Github external
(function(){
  var links = FileLink.all.getValues(function(link){
    return [link.data.from, link.data.to];
  });

  File.all.addHandler({
    itemsChanged: function(dataset, delta){
      if (delta.deleted)
        delta.deleted.forEach(function(file){
          graph.removeNode(file.getId());
        });
    }
  });

  FileLink.all.addHandler({
    itemsChanged: function(dataset, delta){
      if (delta.inserted)
        delta.inserted.forEach(function(link){
          return links.push([link.data.from, link.data.to]);
        });

      if (delta.deleted)
        delta.deleted.forEach(function(link){
          graph.removeLink(link.data.from, link.data.to);
        });
    }
  });

  (function popNode(){
    if (links.length)
    {