Refactor on Splitter

pull/4666/head
Tuğçe Küçükoğlu 2023-10-20 10:17:49 +03:00
parent f72b3cfad5
commit e9e0c897fb
1 changed files with 4 additions and 7 deletions

View File

@ -268,18 +268,15 @@ export default {
if (newPrevPanelSize > 100 || newPrevPanelSize < 0) return false;
if (newNextPanelSize > 100 || newNextPanelSize < 0) return false;
let prevIdx = this.prevPanelIndex;
let nextIdx = prevIdx + 1;
let prevPanelMinSize = ObjectUtils.getVNodeProp(this.panels[this.prevPanelIndex], 'minSize');
let prevPanelMinSize = ObjectUtils.getVNodeProp(this.panels[prevIdx], 'minSize');
if (this.panels[prevIdx].props && prevPanelMinSize && prevPanelMinSize > newPrevPanelSize) {
if (this.panels[this.prevPanelIndex].props && prevPanelMinSize && prevPanelMinSize > newPrevPanelSize) {
return false;
}
let newPanelMinSize = ObjectUtils.getVNodeProp(this.panels[nextIdx], 'minSize');
let newPanelMinSize = ObjectUtils.getVNodeProp(this.panels[this.prevPanelIndex + 1], 'minSize');
if (this.panels[nextIdx].props && newPanelMinSize && newPanelMinSize > newNextPanelSize) {
if (this.panels[this.prevPanelIndex + 1].props && newPanelMinSize && newPanelMinSize > newNextPanelSize) {
return false;
}