refactor: move components from /drawing/inline to /drawing

- they will be used for other positioning element (floating)
This commit is contained in:
Igor Bulovski
2018-06-08 07:50:23 +02:00
parent 548fe3c864
commit ac40a40ec0
42 changed files with 7 additions and 7 deletions

View File

@ -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 {

View File

@ -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;