Skip to content

Commit

Permalink
📝 Simple documentation for core document classes
Browse files Browse the repository at this point in the history
  • Loading branch information
kylewelsby committed Mar 6, 2020
1 parent d664faf commit c01bdea
Show file tree
Hide file tree
Showing 9 changed files with 173 additions and 118 deletions.
4 changes: 3 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lib
node_modules
coverage
coverage
out
docs
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ coverage
*DS_Store
__tests__/__fixtures__/output.odp
lib
*.tgz
*.tgz
docs
5 changes: 1 addition & 4 deletions __tests__/Document.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ async function readFixture(filename) {
const masterStylesFile = files.find(f => f.path === 'styles.xml');
const contentFile = files.find(f => f.path === 'content.xml');
const presentation = new Presentation(JSON.parse(toJson(contentFile.data)));
const style = new Style(
JSON.parse(toJson(masterStylesFile.data)),
presentation
);
const style = new Style(JSON.parse(toJson(masterStylesFile.data)));
const subject = new Document();
return {
presentation,
Expand Down
94 changes: 0 additions & 94 deletions __tests__/__snapshots__/Document.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3025,100 +3025,6 @@ Array [
]
`;

exports[`Document mergeStyles master-page contains the master frames 1`] = `
Array [
Array [
Object {
"draw:image": Object {
"text:p": Object {},
"xlink:actuate": "onLoad",
"xlink:href": "Pictures/100000000000032000000258E080B12F.jpg",
"xlink:show": "embed",
"xlink:type": "simple",
},
"draw:layer": "backgroundobjects",
"draw:style-name": "Mgr1",
"draw:text-style-name": "MP1",
"svg:height": "21cm",
"svg:width": "28cm",
"svg:x": "-0.001cm",
"svg:y": "-0.001cm",
},
Object {
"draw:layer": "backgroundobjects",
"draw:text-box": Object {},
"presentation:class": "title",
"presentation:placeholder": "true",
"presentation:style-name": "prs-novelty-title",
"svg:height": "3.506cm",
"svg:width": "23.911cm",
"svg:x": "2.058cm",
"svg:y": "1.943cm",
},
Object {
"draw:layer": "backgroundobjects",
"draw:text-box": Object {},
"presentation:class": "outline",
"presentation:placeholder": "true",
"presentation:style-name": "prs-novelty-outline1",
"svg:height": "13.23cm",
"svg:width": "23.384cm",
"svg:x": "2.285cm",
"svg:y": "5.938cm",
},
],
Array [
Object {
"draw:layer": "backgroundobjects",
"draw:text-box": Object {
"draw:corner-radius": "0.065cm",
},
"presentation:class": "title",
"presentation:placeholder": "true",
"presentation:style-name": "prs-strategy-title",
"svg:height": "3.506cm",
"svg:width": "23.911cm",
"svg:x": "2.058cm",
"svg:y": "0.325cm",
},
Object {
"draw:layer": "backgroundobjects",
"draw:text-box": Object {},
"presentation:class": "outline",
"presentation:placeholder": "true",
"presentation:style-name": "prs-strategy-outline1",
"svg:height": "13.23cm",
"svg:width": "23.548cm",
"svg:x": "3.023cm",
"svg:y": "6.178cm",
},
Object {
"draw:image": Object {
"text:p": Object {},
"xlink:actuate": "onLoad",
"xlink:href": "Pictures/2000023600002305000012CD3628FC8C.wmf",
"xlink:show": "embed",
"xlink:type": "simple",
},
"draw:layer": "backgroundobjects",
"draw:style-name": "Mgr1",
"draw:text-style-name": "MP1",
"svg:height": "2.937cm",
"svg:width": "5.47cm",
"svg:x": "22.048cm",
"svg:y": "17.365cm",
},
],
]
`;

exports[`Document mergeStyles master-page contains the master style names 1`] = `
Array [
"prs-novelty",
"prs-strategy",
]
`;

exports[`Document mergeStyles merges style content from the presentation into the document style 1`] = `
Object {
"office:document-styles": Object {
Expand Down
Loading

0 comments on commit c01bdea

Please sign in to comment.