src/sap.ui.rta/src/sap/ui/rta/plugin/RTAElementMover.js
function fnIsValidForMove(oOverlay, bOnRegistration) {
		var bValid = false,
			oDesignTimeMetadata = oOverlay.getDesignTimeMetadata(),
			oParentElementOverlay = oOverlay.getParentElementOverlay();

		if (!oDesignTimeMetadata || !oParentElementOverlay) {
			return false;
		}

		var oRelevantContainer = oOverlay.getRelevantContainer();
		var oRelevantContainerOverlay = OverlayRegistry.getOverlay(oRelevantContainer);
		if (!oRelevantContainerOverlay) {
			return false;
		}

		bValid = this.isMoveAvailableOnRelevantContainer(oOverlay);

		if (bValid) {
			bValid = this.oBasePlugin.hasStableId(oOverlay) &&
			this.oBasePlugin.hasStableId(oParentElementOverlay) &&
			this.oBasePlugin.hasStableId(oRelevantContainerOverlay);
		}

		// element is only valid for move if it can be moved to somewhere else
		if (bValid) {
			var aOverlays = OverlayUtil.findAllUniqueAggregationOverlaysInContainer(oOverlay, oRelevantContainerOverlay);

			var aValidAggregationOverlays = aOverlays.filter(function(oAggregationOverlay) {
				return this.checkTargetZone(oAggregationOverlay, oOverlay, bOnRegistration);
			}.bind(this));

			if (aValidAggregationOverlays.length < 1) {
				bValid = false;
			} else if (aValidAggregationOverlays.length === 1) {
				var aVisibleOverlays = aValidAggregationOverlays[0].getChildren().filter(function(oChildOverlay) {
					var oChildElement = oChildOverlay.getElement();
					// At least one sibling has to be visible and still attached to the parent
					// In some edge cases, the child element is not available anymore (element already got destroyed)
					return (oChildElement && oChildElement.getVisible() && oChildElement.getParent());
				});
				bValid = aVisibleOverlays.length > 1;
			}
		}

		return bValid;
	}
function fnIsValidForMove(oOverlay, bOnRegistration) {
		var bValid = false,
			oDesignTimeMetadata = oOverlay.getDesignTimeMetadata(),
			oParentElementOverlay = oOverlay.getParentElementOverlay();

		if (!oDesignTimeMetadata || !oParentElementOverlay) {
			return false;
		}

		var oRelevantContainer = oOverlay.getRelevantContainer();
		var oRelevantContainerOverlay = OverlayRegistry.getOverlay(oRelevantContainer);
		if (!oRelevantContainerOverlay) {
			return false;
		}

		bValid = this.isMoveAvailableOnRelevantContainer(oOverlay);

		if (bValid) {
			bValid = this.oBasePlugin.hasStableId(oOverlay) &&
			this.oBasePlugin.hasStableId(oParentElementOverlay) &&
			this.oBasePlugin.hasStableId(oRelevantContainerOverlay);
		}

		// element is only valid for move if it can be moved to somewhere else
		if (bValid) {
			var aOverlays = OverlayUtil.findAllUniqueAggregationOverlaysInContainer(oOverlay, oRelevantContainerOverlay);

			var aValidAggregationOverlays = aOverlays.filter(function(oAggregationOverlay) {
				return this.checkTargetZone(oAggregationOverlay, oOverlay, bOnRegistration);
			}.bind(this));

			if (aValidAggregationOverlays.length < 1) {
				bValid = false;
			} else if (aValidAggregationOverlays.length === 1) {
				var aVisibleOverlays = aValidAggregationOverlays[0].getChildren().filter(function(oChildOverlay) {
					var oChildElement = oChildOverlay.getElement();
					// At least one sibling has to be visible and still attached to the parent
					// In some edge cases, the child element is not available anymore (element already got destroyed)
					return (oChildElement && oChildElement.getVisible() && oChildElement.getParent());
				});
				bValid = aVisibleOverlays.length > 1;
			}
		}

		return bValid;
	}
function fnIsValidForMove ( oOverlay , bOnRegistration ) { var bValid = false , oDesignTimeMetadata = oOverlay . getDesignTimeMetadata ( ) , oParentElementOverlay = oOverlay . getParentElementOverlay ( ) ; if ( ! oDesignTimeMetadata || ! oParentElementOverlay ) { return false ; } var oRelevantContainer = oOverlay . getRelevantContainer ( ) ; var oRelevantContainerOverlay = OverlayRegistry . getOverlay ( oRelevantContainer ) ; if ( ! oRelevantContainerOverlay ) { return false ; } bValid = this . isMoveAvailableOnRelevantContainer ( oOverlay ) ; if ( bValid ) { bValid = this . oBasePlugin . hasStableId ( oOverlay ) && this . oBasePlugin . hasStableId ( oParentElementOverlay ) && this . oBasePlugin . hasStableId ( oRelevantContainerOverlay ) ; } // element is only valid for move if it can be moved to somewhere else if ( bValid ) { var aOverlays = OverlayUtil . findAllUniqueAggregationOverlaysInContainer ( oOverlay , oRelevantContainerOverlay ) ; var aValidAggregationOverlays = aOverlays . filter ( function ( oAggregationOverlay ) { return this . checkTargetZone ( oAggregationOverlay , oOverlay , bOnRegistration ) ; } . bind ( this ) ) ; if ( aValidAggregationOverlays . length < 1 ) { bValid = false ; } else if ( aValidAggregationOverlays . length === 1 ) { var aVisibleOverlays = aValidAggregationOverlays [ 0 ] . getChildren ( ) . filter ( function ( oChildOverlay ) { var oChildElement = oChildOverlay . getElement ( ) ; // At least one sibling has to be visible and still attached to the parent // In some edge cases, the child element is not available anymore (element already got destroyed) return ( oChildElement && oChildElement . getVisible ( ) && oChildElement . getParent ( ) ) ; } ) ; bValid = aVisibleOverlays . length > 1 ; } } return bValid ; }
Check if the element is editable for the move
@param  {sap.ui.dt.Overlay}  oOverlay The overlay being moved or the aggregation overlay
@param  {boolean} bOnRegistration if embedded, false if not
@return {boolean} true if editable
Check if the element is editable for the move