refactor: move components from /drawing/inline to /drawing
- they will be used for other positioning element (floating)
This commit is contained in:
@ -1,11 +1,11 @@
|
||||
// http://officeopenxml.com/drwPicInline.php
|
||||
import { IMediaDataDimensions } from "file/media";
|
||||
import { XmlComponent } from "file/xml-components";
|
||||
import { DocProperties } from "./doc-properties/doc-properties";
|
||||
import { EffectExtent } from "./effect-extent/effect-extent";
|
||||
import { Extent } from "./extent/extent";
|
||||
import { Graphic } from "./graphic";
|
||||
import { GraphicFrameProperties } from "./graphic-frame/graphic-frame-properties";
|
||||
import { DocProperties } from "./../doc-properties/doc-properties";
|
||||
import { EffectExtent } from "./../effect-extent/effect-extent";
|
||||
import { Extent } from "./../extent/extent";
|
||||
import { Graphic } from "./../graphic";
|
||||
import { GraphicFrameProperties } from "./../graphic-frame/graphic-frame-properties";
|
||||
import { InlineAttributes } from "./inline-attributes";
|
||||
|
||||
export class Inline extends XmlComponent {
|
||||
|
@ -111,10 +111,10 @@ export class ImportedXmlComponent extends XmlComponent {
|
||||
static fromXmlString(importedContent: string): ImportedXmlComponent {
|
||||
const imported = fastXmlParser.parse(importedContent, parseOptions);
|
||||
const elementName = Object.keys(imported)[0];
|
||||
|
||||
|
||||
const converted = convertToXmlComponent(elementName, imported[elementName]);
|
||||
|
||||
if (Array.isArray(converted) && converted.length > 1) {
|
||||
if (Array.isArray(converted) && converted.length > 1) {
|
||||
throw new Error("Invalid conversion, input must be one element.");
|
||||
}
|
||||
return Array.isArray(converted) ? converted[0] : converted;
|
||||
|
Reference in New Issue
Block a user