Sha256: 2cf636b4bb8caca992c30cac67a148ad8129b92aa444483afa11bbfa93c51765

Contents?: true

Size: 617 Bytes

Versions: 7

Compression:

Stored size: 617 Bytes

Contents

pageflow.sitemap.utils = {
  size: function(selection, w, h) {
    selection
      .attr('width', w)
      .attr('height', h);
  },

  translate: function(x, y) {
    return 'translate(' + x + ',' + y + ')';
  },

  fn: {
    d: function(property) {
      return function(d) {
        return d[property];
      };
    },

    translate: function(x, y) {
      return function(d) {
        return 'translate(' + d[x] + ',' + d[y] + ')';
      };
    },

    trigger: function(fn) {
      return function(d) {
        if (typeof fn === 'function') {
          fn.apply(this, arguments);
        }
      };
    }
  }
};

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pageflow-sitemap-1.5.0 app/assets/javascripts/pageflow/sitemap/editor/d3/utils.js
pageflow-sitemap-1.4.0 app/assets/javascripts/pageflow/sitemap/editor/d3/utils.js
pageflow-sitemap-1.3.0 app/assets/javascripts/pageflow/sitemap/editor/d3/utils.js
pageflow-sitemap-1.2.0 app/assets/javascripts/pageflow/sitemap/editor/d3/utils.js
pageflow-sitemap-1.1.0 app/assets/javascripts/pageflow/sitemap/editor/d3/utils.js
pageflow-sitemap-1.0.0 app/assets/javascripts/pageflow/sitemap/editor/d3/utils.js
pageflow-sitemap-0.1.0 app/assets/javascripts/pageflow/sitemap/editor/d3/utils.js