mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 10:04:33 +02:00
added error check to gui
This commit is contained in:
parent
2156a8fa8f
commit
c42ac793b9
|
@ -366,19 +366,21 @@ onMounted(() => {
|
|||
setGridEditState();
|
||||
});
|
||||
function onChange(event, changeItems) {
|
||||
// update item position
|
||||
changeItems.forEach((item) => {
|
||||
var widget = items.value.find((w) => w.id == item.id);
|
||||
if (!widget) {
|
||||
console.error("Widget not found: " + item.id);
|
||||
return;
|
||||
if (typeof changeItems !== "undefined"){
|
||||
// update item position
|
||||
changeItems.forEach((item) => {
|
||||
var widget = items.value.find((w) => w.id == item.id);
|
||||
if (!widget) {
|
||||
console.error("Widget not found: " + item.id);
|
||||
return;
|
||||
}
|
||||
widget.x = item.x;
|
||||
widget.y = item.y;
|
||||
widget.w = item.w;
|
||||
widget.h = item.h;
|
||||
});
|
||||
saveGridLayout();
|
||||
}
|
||||
widget.x = item.x;
|
||||
widget.y = item.y;
|
||||
widget.w = item.w;
|
||||
widget.h = item.h;
|
||||
});
|
||||
saveGridLayout();
|
||||
}
|
||||
function restoreGridLayoutFromConfig(){
|
||||
//Try to load grid from saved config
|
||||
|
|
Loading…
Reference in a new issue