Fix height rule (#241)

* use atLeast

* use atLeast

* fix: height rule

* fix: snaps

* fix

* fix

* 0.0.148

* update snaps
main
bokuweb 2021-03-15 15:54:14 +09:00 committed by GitHub
parent b900ff138c
commit ffd03e0b12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 25 additions and 25 deletions

View File

@ -15,7 +15,7 @@ impl ElementReader for TableRow {
let mut grid_after = None;
let mut width_after = None;
let mut row_height = None;
let mut height_rule = Some(HeightRule::Exact);
let mut height_rule = Some(HeightRule::AtLeast);
loop {
let e = r.next();
match e {

View File

@ -17,7 +17,7 @@ pub enum HeightRule {
impl Default for HeightRule {
fn default() -> Self {
Self::Exact
Self::AtLeast
}
}
@ -38,7 +38,7 @@ impl FromStr for HeightRule {
"auto" => Ok(HeightRule::Auto),
"atLeast" => Ok(HeightRule::AtLeast),
"exact" => Ok(HeightRule::Exact),
_ => Ok(HeightRule::Exact),
_ => Ok(HeightRule::AtLeast),
}
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,7 @@ export class TableRow {
cells: TableCell[] = [];
hasNumberings = false;
height: number | null = null;
hRule: HeightRule = "exact";
hRule: HeightRule = "atLeast";
addCell(cell: TableCell) {
if (cell.hasNumberings) {

View File

@ -1,6 +1,6 @@
{
"name": "docx-wasm",
"version": "0.0.144",
"version": "0.0.148",
"main": "dist/node/index.js",
"browser": "dist/web/index.js",
"author": "bokuweb <bokuweb12@gmail.com>",

View File

@ -1016,7 +1016,7 @@ Object {
"hasNumbering": false,
"property": Object {
"gridAfter": null,
"heightRule": "exact",
"heightRule": "atLeast",
"rowHeight": 970,
"widthAfter": null,
},
@ -1179,7 +1179,7 @@ Object {
"hasNumbering": false,
"property": Object {
"gridAfter": 1,
"heightRule": "exact",
"heightRule": "atLeast",
"rowHeight": 55,
"widthAfter": 1065,
},
@ -1342,7 +1342,7 @@ Object {
"hasNumbering": false,
"property": Object {
"gridAfter": 1,
"heightRule": "exact",
"heightRule": "atLeast",
"rowHeight": 675,
"widthAfter": 1065,
},
@ -1505,7 +1505,7 @@ Object {
"hasNumbering": false,
"property": Object {
"gridAfter": 2,
"heightRule": "exact",
"heightRule": "atLeast",
"rowHeight": 397,
"widthAfter": 3717,
},
@ -1668,7 +1668,7 @@ Object {
"hasNumbering": false,
"property": Object {
"gridAfter": 2,
"heightRule": "exact",
"heightRule": "atLeast",
"rowHeight": 397,
"widthAfter": 3717,
},
@ -1907,7 +1907,7 @@ Object {
"hasNumbering": false,
"property": Object {
"gridAfter": 2,
"heightRule": "exact",
"heightRule": "atLeast",
"rowHeight": 397,
"widthAfter": 3717,
},
@ -2146,7 +2146,7 @@ Object {
"hasNumbering": false,
"property": Object {
"gridAfter": 2,
"heightRule": "exact",
"heightRule": "atLeast",
"rowHeight": 397,
"widthAfter": 3717,
},
@ -2373,7 +2373,7 @@ Object {
"hasNumbering": false,
"property": Object {
"gridAfter": 2,
"heightRule": "exact",
"heightRule": "atLeast",
"rowHeight": 397,
"widthAfter": 3717,
},
@ -2612,7 +2612,7 @@ Object {
"hasNumbering": false,
"property": Object {
"gridAfter": 2,
"heightRule": "exact",
"heightRule": "atLeast",
"rowHeight": 397,
"widthAfter": 3717,
},
@ -9345,7 +9345,7 @@ Object {
"hasNumbering": false,
"property": Object {
"gridAfter": null,
"heightRule": "exact",
"heightRule": "atLeast",
"rowHeight": null,
"widthAfter": null,
},
@ -9536,7 +9536,7 @@ Object {
"hasNumbering": false,
"property": Object {
"gridAfter": null,
"heightRule": "exact",
"heightRule": "atLeast",
"rowHeight": null,
"widthAfter": null,
},
@ -9727,7 +9727,7 @@ Object {
"hasNumbering": false,
"property": Object {
"gridAfter": null,
"heightRule": "exact",
"heightRule": "atLeast",
"rowHeight": null,
"widthAfter": null,
},