mirror of
https://github.com/esjeon/krohnkite.git
synced 2024-10-04 07:18:09 +03:00
fix unit size computation
include padding(title + border) size in unit factor computation
This commit is contained in:
parent
7ebfe76d47
commit
cb7f96837b
@ -148,8 +148,8 @@ class Tile {
|
||||
const geom = this.geometry;
|
||||
const base = this.client.minSize;
|
||||
|
||||
const nw = Math.floor((geom.width - base.width ) / unit.width);
|
||||
const nh = Math.floor((geom.height - base.height) / unit.height);
|
||||
const nw = Math.floor((geom.width - base.width - this.padWidth ) / unit.width);
|
||||
const nh = Math.floor((geom.height - base.height - this.padHeight) / unit.height);
|
||||
this.geometry.width = base.width + unit.width * nw + this.padWidth;
|
||||
this.geometry.height = base.height + unit.height * nh + this.padHeight;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user