updateImgData( index, imgData ) {
		const {
			attributes,
			setAttributes
		} = this.props;

		const {
			objectData
		} = attributes;

		const newObjectData = objectData.concat();

		if ( typeof imgData['imgIndex'] != 'undefined' ) {
			newObjectData[ index ]['imgIndex'] = imgData['imgIndex'];
			newObjectData[ index ]['imgURL'] = null;
		}
		if ( typeof imgData['imgURL'] != 'undefined' ) {
			newObjectData[ index ]['imgURL'] = imgData['imgURL'];
		}

		setAttributes( { objectData: newObjectData } );
	}
/**
	 * Updates the image data for a particular image.
	 * 
	 * @param {number} index            The array index of the image. 
	 * @param {object} imgData          The updated data for that image.
	 * @param {string} imgData.imgURL   New URL for that image.
	 * @param {number} imgData.imgIndex New index for that image (refers to
	 *                                  array index from a particular object's
	 *                                  array of images, not the grid index).
	 */
Updates the image data for a particular image.

@param {number} index            The array index of the image.
@param {object} imgData          The updated data for that image.
@param {string} imgData.imgURL   New URL for that image.
@param {number} imgData.imgIndex New index for that image (refers to
array index from a particular object's
array of images, not the grid index).
Updates the image data for a particular image . @param { number } index The array index of the image . @param { object } imgData The updated data for that image . @param { string } imgData . imgURL New URL for that image . @param { number } imgData . imgIndex New index for that image ( refers to array index from a particular object ' s array of images not the grid index ) .
updateImgData( index, imgData ) {
		const {
			attributes,
			setAttributes
		} = this.props;
		const {
			objectData
		} = attributes;
		const newObjectData = objectData.concat();
		if ( typeof imgData['imgIndex'] != 'undefined' ) {
			newObjectData[ index ]['imgIndex'] = imgData['imgIndex'];
			newObjectData[ index ]['imgURL'] = null;
		}
		if ( typeof imgData['imgURL'] != 'undefined' ) {
			newObjectData[ index ]['imgURL'] = imgData['imgURL'];
		}
		setAttributes( { objectData: newObjectData } );
	}
updateImgData ( index , imgData ) { const { attributes , setAttributes } = this . props ; const { objectData } = attributes ; const newObjectData = objectData . concat ( ) ; if ( typeof imgData [ 'imgIndex' ] != 'undefined' ) { newObjectData [ index ] [ 'imgIndex' ] = imgData [ 'imgIndex' ] ; newObjectData [ index ] [ 'imgURL' ] = null ; } if ( typeof imgData [ 'imgURL' ] != 'undefined' ) { newObjectData [ index ] [ 'imgURL' ] = imgData [ 'imgURL' ] ; } setAttributes ( { objectData : newObjectData } ) ; }
Updates the image data for a particular image.
Updates the image data for a particular image .