Use exact depth and selected type for icon crop
CI / PHP lint (7.4) (push) Successful in 1m0s
CI / PHP lint (8.1) (push) Successful in 59s
CI / Coding standards (push) Successful in 1m10s

This commit is contained in:
tiamak
2026-04-14 12:13:26 +00:00
parent 6acb48fe22
commit 8e7a65f32a
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -468,6 +468,7 @@
var uploadInput = nodeModal.querySelector('.js-node-icon-upload');
uploadInput.value = '';
uploadInput.onchange = function (event) {
var currentType = nodeModal.querySelector('.js-node-type').value || node.type || 'link';
uploadImage(event.target.files[0], 'menu_icon', function (response) {
node.icon_path = response.path;
node.icon_url = response.url;
@@ -475,7 +476,7 @@
serializeTree();
}, {
menuDepth: depth,
menuType: node.type || 'link'
menuType: currentType
});
};