X-Git-Url: https://git.kianting.info/?a=blobdiff_plain;f=src%2Flibclo%2FbreakLines.ts;fp=src%2Flibclo%2FbreakLines.ts;h=45ffe6545ea88e60c74e8575b4b908364fb52703;hb=e9819c8bc28d209d79461117d5b70f7b6b94abb6;hp=0392a23062743c6031a8d885e15af3cea3dfa357;hpb=9c51921978468526aed0da6060900fe54967848e;p=clo diff --git a/src/libclo/breakLines.ts b/src/libclo/breakLines.ts index 0392a23..45ffe65 100644 --- a/src/libclo/breakLines.ts +++ b/src/libclo/breakLines.ts @@ -51,7 +51,8 @@ export class BreakLineAlgorithm { } segmentedNodes(items : BoxesItem[], lineWidth : number) : BoxesItem[][]{ - this.totalCost(items ,lineWidth); + let lineWidthFixed = lineWidth * 0.75; + this.totalCost(items ,lineWidthFixed); let nodeList = this.generateBreakLineNodeList(); console.log("~~~", nodeList); let res = []; @@ -64,6 +65,7 @@ export class BreakLineAlgorithm { up = nodeList[i+1]; } + console.log("===", res.length); return res; } @@ -98,13 +100,11 @@ export class BreakLineAlgorithm { for (var i=0; i