
Resize behavior
| Name space | rialto.widgetBehavior |
| FILE | multi-files in rialtoEngine\javascript\core\coreBehaviors\RS_*.js |
| NAME | Resize behavior |
| INHERITS | |
| VERSION | 0.86 |
| update | |
| DESCRIPTION | It 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
| Name | Type | Description | Default |
| objectToMove | object | HTML or javascript object on which we want to affect the behavior | |
| behavior | String | kind of behavior ('DragAndDrop',''Missile','Target','ReSize') | |
| setup | object | setup parameters for the behavior | |
| orientation | sring | resize limitation: none ('2D'),only horizontal ('h') or vertical('v') resize | 2D |
| bRectLim | boolean | indicate that a limit object must be use | true |
| limitReDim.heightMin | int | minimum height when resize | |
| limitReDim.heightMax | int | maximum height when resize | |
| limitReDim.widthMin | int | minimum width when resize | |
| limitReDim.widthMax | int | maximum width when resize | |
| majDyn | boolean | if true the moving limits are evaluate on each drag and drop cycle else they are calculate only on the initial affectof the behavior | true |
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
| Method | Arguments list | Return value | Inherits | To redefine |
| synchroRS | object totalMove | void | no | yes |
| afterRS | object totalMove | object | no | yes |
| afterClic | | void | no | yes |
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.