|
|
|
@ -650,7 +650,7 @@ export default class Resizer { |
|
|
|
* All positioning logic |
|
|
|
* @return {Object} |
|
|
|
*/ |
|
|
|
calc(data: Resizer) { |
|
|
|
calc(data: Resizer): RectDim | undefined { |
|
|
|
let value; |
|
|
|
const opts = this.opts || {}; |
|
|
|
const step = opts.step!; |
|
|
|
@ -665,7 +665,7 @@ export default class Resizer { |
|
|
|
const unitHeight = this.opts.unitHeight; |
|
|
|
const startW = unitWidth === '%' ? (startDim.w / 100) * parentW : startDim.w; |
|
|
|
const startH = unitHeight === '%' ? (startDim.h / 100) * parentH : startDim.h; |
|
|
|
var box: RectDim = { |
|
|
|
const box: RectDim = { |
|
|
|
t: startDim.t, |
|
|
|
l: startDim.l, |
|
|
|
w: startW, |
|
|
|
@ -730,6 +730,11 @@ export default class Resizer { |
|
|
|
box.t += startDim.h - box.h; |
|
|
|
} |
|
|
|
|
|
|
|
for (const key in box) { |
|
|
|
const i = key as keyof RectDim; |
|
|
|
box[i] = parseInt(`${box[i]}`, 10); |
|
|
|
} |
|
|
|
|
|
|
|
return box; |
|
|
|
} |
|
|
|
} |
|
|
|
|