Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 548eab5

Browse files
committed
Scroll fix attempt
1 parent f3da79a commit 548eab5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/dd-resizable.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,12 +257,12 @@ export class DDResizable extends DDBaseImplement implements HTMLElementExtendOpt
257257
if (offsetX > offsetY) {
258258
if (dir.indexOf('e') > -1) {
259259
newRect.width += offsetX;
260-
newRect.height += Math.round(offsetX / fixedAspectRatio);
260+
newRect.height += Math.round(offsetX / fixedAspectRatio) - this.scrolled;
261261
} else if (dir.indexOf('w') > -1) {
262262
newRect.width -= offsetX;
263263
newRect.left += offsetX;
264264

265-
newRect.height -= Math.round(offsetX / fixedAspectRatio);
265+
newRect.height -= Math.round(offsetX / fixedAspectRatio) + this.scrolled;
266266
newRect.top += Math.round(offsetX / fixedAspectRatio);
267267
}
268268
} else {

0 commit comments

Comments
 (0)