Fix dropzone issue and resize issue

This commit is contained in:
city-unit
2023-09-02 15:40:15 -04:00
parent 838cd81f8e
commit 08e1b5bb5e
2 changed files with 8 additions and 12 deletions

View File

@@ -557,6 +557,12 @@ export function dragElement(elmnt) {
//set a listener for mouseup to save new width/height
elmnt.off('mouseup').on('mouseup', () => {
console.debug(`Saving ${elmntName} Height/Width`)
// check if the height or width actually changed
if (power_user.movingUIState[elmntName].width === width && power_user.movingUIState[elmntName].height === height) {
console.debug('no change detected, aborting save')
return
}
power_user.movingUIState[elmntName].width = width;
power_user.movingUIState[elmntName].height = height;
eventSource.emit('resizeUI', elmntName);