fix unit size computation

include padding(title + border) size in unit factor computation
This commit is contained in:
Eon S. Jeon 2018-12-19 08:17:03 +09:00
parent 7ebfe76d47
commit cb7f96837b

View File

@ -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;