Use exact depth and selected type for icon crop
This commit is contained in:
+2
-1
@@ -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
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user