wire/modules/Inputfield/InputfieldImage/InputfieldImage.js
/**
	 * Move the edit panel, placing it correctly in the grid were necessary
	 *
	 * @param $el
	 * @param $edit
	 *
	 */
Move the edit panel, placing it correctly in the grid were necessary
@param $el
@param $edit
Move the edit panel placing it correctly in the grid were necessary @param $el @param $edit
function moveEdit($el, $edit) {
		if(!$el || !$el.length) return;
		var $children = $el.parent().children().not(".InputfieldImageEdit");
		var lastTop = 0;
		var found = false;
		var $insertBeforeItem = null;
		$children.each(function() {
			if($insertBeforeItem) return;
			var $item = $(this);
			var top = $item.offset().top;
			if(found && top != lastTop) {
				$insertBeforeItem = $item;
			} else if($item.attr('id') == $el.attr('id')) {
				found = true;
			}
			lastTop = top;
		}); 
		if($insertBeforeItem) {
			$edit.insertBefore($insertBeforeItem);
		} else {
			$edit.insertAfter($children.eq($children.length - 1));
		}
		var $arrow = $edit.find(".InputfieldImageEdit__arrow");
		if($arrow.length) $arrow.css("left", $el.position().left + ($el.outerWidth() / 2) + "px");
	}
function moveEdit ( $el , $edit ) { if ( ! $el || ! $el . length ) return ; var $children = $el . parent ( ) . children ( ) . not ( ".InputfieldImageEdit" ) ; var lastTop = 0 ; var found = false ; var $insertBeforeItem = null ; $children . each ( function ( ) { if ( $insertBeforeItem ) return ; var $item = $ ( this ) ; var top = $item . offset ( ) . top ; if ( found && top != lastTop ) { $insertBeforeItem = $item ; } else if ( $item . attr ( 'id' ) == $el . attr ( 'id' ) ) { found = true ; } lastTop = top ; } ) ; if ( $insertBeforeItem ) { $edit . insertBefore ( $insertBeforeItem ) ; } else { $edit . insertAfter ( $children . eq ( $children . length - 1 ) ) ; } var $arrow = $edit . find ( ".InputfieldImageEdit__arrow" ) ; if ( $arrow . length ) $arrow . css ( "left" , $el . position ( ) . left + ( $el . outerWidth ( ) / 2 ) + "px" ) ; }
Move the edit panel, placing it correctly in the grid were necessary
 @param $el
 @param $edit
Move the edit panel placing it correctly in the grid were necessary @param $el @param $edit
//getImagesPerRow($el.parent()); //var	perRow = parseInt($el.parent().attr("data-per-row")); //var	index = $children.index($el); /*
		for(var i = 0; i < 30; i++) {
			if(index % perRow !== perRow - 1) {
				index++;
			} else {
				continue;
			}
		}

		index = Math.min(index, $children.length - 1); // Do not excede number of items
		$edit.insertAfter($children.eq(index));
		*/