tiling.js 644 B

123456789101112131415161718192021
  1. /**
  2. * DevExtreme (viz/funnel/tiling.js)
  3. * Version: 19.1.16
  4. * Build date: Tue Oct 18 2022
  5. *
  6. * Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
  7. * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
  8. */
  9. "use strict";
  10. var _normalizeEnum = require("../core/utils").normalizeEnum;
  11. var algorithms = {};
  12. var defaultAlgorithm;
  13. exports.getAlgorithm = function(name) {
  14. return algorithms[_normalizeEnum(name)] || defaultAlgorithm
  15. };
  16. exports.addAlgorithm = function(name, callback, setDefault) {
  17. algorithms[name] = callback;
  18. if (setDefault) {
  19. defaultAlgorithm = algorithms[name]
  20. }
  21. };