normalize sizes when starting drag operation
This commit is contained in:
parent
9456fc040d
commit
a413f358f7
5 changed files with 51 additions and 39 deletions
|
@ -82,4 +82,23 @@ export default class ResizeItem {
|
|||
callback(null, this.id, this.domNode);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
first() {
|
||||
const firstHandle = Array.from(this.domNode.parentElement.children).find(el => {
|
||||
return this.resizer.isResizeHandle(el);
|
||||
});
|
||||
if (firstHandle) {
|
||||
return ResizeItem.fromResizeHandle(firstHandle, this.resizer, this.sizer);
|
||||
}
|
||||
}
|
||||
|
||||
last() {
|
||||
const lastHandle = Array.from(this.domNode.parentElement.children).reverse().find(el => {
|
||||
return this.resizer.isResizeHandle(el);
|
||||
});
|
||||
if (lastHandle) {
|
||||
return ResizeItem.fromResizeHandle(lastHandle, this.resizer, this.sizer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue