|
|
@ -571,6 +571,8 @@ export default class Resizer { |
|
|
const elStyle = el.style as Record<string, any>; |
|
|
const elStyle = el.style as Record<string, any>; |
|
|
elStyle[keyWidth!] = rect.w + unitWidth!; |
|
|
elStyle[keyWidth!] = rect.w + unitWidth!; |
|
|
elStyle[keyHeight!] = rect.h + unitHeight!; |
|
|
elStyle[keyHeight!] = rect.h + unitHeight!; |
|
|
|
|
|
elStyle.top = rect.t + unitHeight!; |
|
|
|
|
|
elStyle.left = rect.l + unitWidth!; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
this.updateContainer(); |
|
|
this.updateContainer(); |
|
|
@ -663,9 +665,9 @@ export default class Resizer { |
|
|
const unitHeight = this.opts.unitHeight; |
|
|
const unitHeight = this.opts.unitHeight; |
|
|
const startW = unitWidth === '%' ? (startDim.w / 100) * parentW : startDim.w; |
|
|
const startW = unitWidth === '%' ? (startDim.w / 100) * parentW : startDim.w; |
|
|
const startH = unitHeight === '%' ? (startDim.h / 100) * parentH : startDim.h; |
|
|
const startH = unitHeight === '%' ? (startDim.h / 100) * parentH : startDim.h; |
|
|
var box = { |
|
|
var box: RectDim = { |
|
|
t: 0, |
|
|
t: startDim.t, |
|
|
l: 0, |
|
|
l: startDim.l, |
|
|
w: startW, |
|
|
w: startW, |
|
|
h: startH, |
|
|
h: startH, |
|
|
}; |
|
|
}; |
|
|
@ -722,10 +724,10 @@ export default class Resizer { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (~attr.indexOf('l')) { |
|
|
if (~attr.indexOf('l')) { |
|
|
box.l = startDim.w - box.w; |
|
|
box.l += startDim.w - box.w; |
|
|
} |
|
|
} |
|
|
if (~attr.indexOf('t')) { |
|
|
if (~attr.indexOf('t')) { |
|
|
box.t = startDim.h - box.h; |
|
|
box.t += startDim.h - box.h; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return box; |
|
|
return box; |
|
|
|