common.js 1002 B

1234567891011121314151617181920212223242526272829303132
  1. /**
  2. * DevExtreme (viz/tree_map/common.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 _patchFontOptions = require("../core/utils").patchFontOptions;
  11. exports.buildRectAppearance = function(option) {
  12. var border = option.border || {};
  13. return {
  14. fill: option.color,
  15. opacity: option.opacity,
  16. stroke: border.color,
  17. "stroke-width": border.width,
  18. "stroke-opacity": border.opacity,
  19. hatching: option.hatching
  20. }
  21. };
  22. exports.buildTextAppearance = function(options, filter) {
  23. return {
  24. attr: options["stroke-width"] ? {
  25. stroke: options.stroke,
  26. "stroke-width": options["stroke-width"],
  27. "stroke-opacity": options["stroke-opacity"],
  28. filter: filter
  29. } : {},
  30. css: _patchFontOptions(options.font)
  31. }
  32. };