Resize behavior


Name spacerialto.widgetBehavior
FILEmulti-files in rialtoEngine\javascript\core\coreBehaviors\RS_*.js
NAMEResize behavior
INHERITS
VERSION0.86
update
DESCRIPTIONIt is rather the description of the affectation of the resize behavior (relative to several files) than the description of an independent component



Details of setup properties


NameTypeDescriptionDefault
objectToMoveobjectHTML or javascript object on which we want to affect the behavior
behaviorStringkind of behavior ('DragAndDrop',''Missile','Target','ReSize')
setupobjectsetup parameters for the behavior
orientationsringresize limitation: none ('2D'),only horizontal ('h') or vertical('v') resize2D
bRectLimbooleanindicate that a limit object must be usetrue
limitReDim.heightMinintminimum height when resize
limitReDim.heightMaxintmaximum height when resize
limitReDim.widthMinintminimum width when resize
limitReDim.widthMaxintmaximum width when resize
majDynbooleanif true the moving limits are evaluate on each drag and drop cycle else they are calculate only on the initial affectof the behaviortrue

Example:
        	var o = document.getElementById('objectToMove');
			var setup={sensitiveEdgeWidth  :3,
					   orientation : 'h',
					  limitReDim:{heightMin:15,widthMin:50}
					  ,bRectLim : true});					
			rialto.widgetBehavior.affect(o,'ReSize',setup);
		

CALLBACK METHODS


MethodArguments listReturn valueInheritsTo redefine
synchroRSobject totalMovevoidnoyes
afterRSobject totalMoveobjectnoyes
afterClicvoidnoyes

synchroRS

this method is raise on each mouse move event and she pass as parameter an object that contains move informations
Parameters:
object totalMove:object with 4 properties 'top','left','width','height' that represents the total top,left,width and height move from the begining of the resize

The code must be redefine after the affectation of the behavior. By default this method does nothing.

afterRS

this method is raise at the end of the resize and she pass as parameter an object that contains move informations
Parameters:
object totalMove:object with 4 properties 'top','left','width','height' that represents the total top,left,width and height move from the begining of the resize

The code must be redefine after the affectation of the behavior. By default this method does nothing.

afterClic

this method is raise when there is a click without movement. You have to redifine this method when you want to add a onclick event handler on the object that have a resize behavior.
Parameters:

The code must be redefine after the affectation of the behavior. By default this method does nothing.