UNPKG

zp-figma-converter

Version:

Convert Figma designs to various code formats

30 lines 1.24 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.LoadingBarParser = void 0; const xml_utils_1 = require("../../../../utils/xml-utils"); const widget_parser_1 = require("./widget-parser"); /** * Parser for LoadingBarData */ class LoadingBarParser extends widget_parser_1.WidgetParser { parse(nodeData) { const result = this.parseBaseAttributes(nodeData); // LoadingBar specific properties if (nodeData.ProgressInfo !== undefined) result['@_ProgressInfo'] = (0, xml_utils_1.toString)(nodeData.ProgressInfo); if (nodeData.Direction !== undefined) result['@_Direction'] = (0, xml_utils_1.toString)(nodeData.Direction); if (nodeData.TouchEnable !== undefined) result['@_TouchEnable'] = (0, xml_utils_1.boolToString)(nodeData.TouchEnable); if (nodeData.ImageFileData) { result.ImageFileData = { '@_Type': nodeData.ImageFileData.Type, '@_Path': nodeData.ImageFileData.Path, '@_Plist': nodeData.ImageFileData.Plist }; } return result; } } exports.LoadingBarParser = LoadingBarParser; //# sourceMappingURL=loading-bar-parser.js.map