Skip to content

Commit

Permalink
Core: fix m_svg to contain default export
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanblinov2k17 committed Oct 15, 2024
1 parent b37627b commit 164207c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions packages/devextreme/js/__internal/core/utils/m_svg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,9 @@ export function getSvgElement(markup) {
return markup.get(0);
}
}

export default {
getSvgElement,
getSvgMarkup,
HIDDEN_FOR_EXPORT
}
8 changes: 4 additions & 4 deletions packages/devextreme/js/exporter/svg_creator.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { getWindow } from '../core/utils/window';
const window = getWindow();
import { isFunction } from '../core/utils/type';
import { each } from '../core/utils/iterator';
import { getSvgElement, getSvgMarkup, HIDDEN_FOR_EXPORT } from '../core/utils/svg';
import svgUtils from '../__internal/core/utils/m_svg';
import { when, Deferred } from '../core/utils/deferred';

export const svgCreator = {
Expand Down Expand Up @@ -77,11 +77,11 @@ export const svgCreator = {
let markup;
const that = this;
const xmlVersion = '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
const svgElem = getSvgElement(data);
const svgElem = svgUtils.getSvgElement(data);
const $svgObject = $(svgElem);
$svgObject.find(`[${HIDDEN_FOR_EXPORT}]`).remove();
$svgObject.find(`[${svgUtils.HIDDEN_FOR_EXPORT}]`).remove();

markup = xmlVersion + getSvgMarkup($svgObject.get(0), options.backgroundColor);
markup = xmlVersion + svgUtils.getSvgMarkup($svgObject.get(0), options.backgroundColor);

return that._prepareImages(svgElem).then(() => {
each(that._imageArray, function(href, dataURI) {
Expand Down

0 comments on commit 164207c

Please sign in to comment.