Browse Source

Up Resizer dim values

pull/5071/head
Artur Arseniev 4 years ago
parent
commit
24dd628ebe
  1. 9
      src/utils/Resizer.ts

9
src/utils/Resizer.ts

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

Loading…
Cancel
Save