UNPKG

d3-transform

Version:

addon to d3.js that wraps SVG transforms into an API

1 lines 755 B
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.d3=t.d3||{})}(this,function(t){"use strict";function e(t){function e(t,e){var o=e.length;r.push(function(){return"seq"==t?e[0].apply(this,n(arguments)):t+"("+(1==o&&"function"==typeof e[0]?e[0].apply(this,n(arguments)):e)+")"})}function n(t){return Array.prototype.slice.call(t)}var r=[];void 0!==t&&r.push(t);var o=function(){var t=this,e=n(arguments);return r.map(function(n){return n.apply(t,e)}).join(" ")};return["translate","rotate","scale","matrix","skewX","skewY","seq"].forEach(function(t){o[t]=function(){return e(t,n(arguments)),o}}),o}t.transform=e,Object.defineProperty(t,"__esModule",{value:!0})});