Skip to content

Commit

Permalink
feat: Add Bin.border to control space to edge
Browse files Browse the repository at this point in the history
test(maxrects-bin.spec.js): Tightening test code on border/padding
fix #5
  • Loading branch information
soimy committed Jun 12, 2019
1 parent a7527b6 commit 62bc66b
Show file tree
Hide file tree
Showing 16 changed files with 197 additions and 87 deletions.
9 changes: 7 additions & 2 deletions TODO
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@
✔ 更新README.md @done(19-05-26 17:34)
✔ Test增加Generic type部分 @done(19-05-26 17:04)
✔ 发布2.1.0版 @done(19-05-26 18:20)
☐ 增加Bin.border控制参数
✔ 增加Bin.border控制参数 @started(19-06-11 18:08) @done(19-06-11 18:31) @lasted(23m35s)
✔ 修正Bin.border错误 @started(19-06-11 21:56) @done(19-06-12 02:56) @lasted(5h51s)
✔ 完善border部分test @done(19-06-12 02:56)
✔ `hash`二次排序 @done(19-06-04 15:39)
☐ 完善注释和文档
✔ 发布gh-pages @done(19-06-04 15:39)
✔ 增加翻片儿`next()` @done(19-06-04 15:39)
✔ 根据tag自动分配Bin @done(19-06-06 00:32) @lasted(12s)
✔ 根据tag自动分配Bin @done(19-06-06 00:32) @lasted(12s)
☐ 增加isDirty状态
✔ MaxRectsBin.isDirty @done(19-06-11 18:08)
☐ Rectangle.isDirty
2 changes: 2 additions & 0 deletions dist/maxrects-packer.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ interface IOption {
square?: boolean;
allowRotation?: boolean;
tag?: boolean;
border?: number;
}
declare class MaxRectsPacker<T extends IRectangle = Rectangle> {
width: number;
Expand Down Expand Up @@ -250,6 +251,7 @@ declare class MaxRectsBin<T extends IRectangle = Rectangle> extends Bin {
rects: IRectangle[];
private verticalExpand;
private stage;
private border;
constructor(maxWidth?: number, maxHeight?: number, padding?: number, options?: IOption);
add(rect: T): T | undefined;
add(width: number, height: number, data: any): Rectangle | undefined;
Expand Down
35 changes: 17 additions & 18 deletions dist/maxrects-packer.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/maxrects-packer.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 62bc66b

Please sign in to comment.