| | |
| | | } |
| | | let values = this.splitIDs(value); |
| | | values.forEach(v => { |
| | | if (Object.keys(item.images).includes(v)) { |
| | | if (Object.hasOwn(item.images, v)) { |
| | | return true; |
| | | } |
| | | }); |
| | | return false; |
| | | } |
| | | formatImageFields(element, value, item) { |
| | | console.log('Formatting image Field: ', element); |
| | | console.log('value: ', value); |
| | | console.log('item: ', item); |
| | | if (value.length === 0) return; |
| | | //If it's a gallery, we're cloning the original image, then removing it |
| | | if (value.length > 1) { |
| | |
| | | }); |
| | | image.remove(); |
| | | } else { |
| | | console.log(element.tagName); |
| | | if (element.tagName !== 'IMG') { |
| | | element = element.querySelector('img'); |
| | | if (!element) return; |