src/services/web-components.service.ts
constructor(anchorService: AnchorService)
|
||||||
Parameters :
|
applyAnchorToComponent | ||||||||
applyAnchorToComponent(component: any)
|
||||||||
Applies anchor to component According to the anchor value in the component this function should call the anchor service to apply the expected transformation.
Parameters :
Returns :
void
|
calculatePosition | ||||||
calculatePosition(parentInstance: any)
|
||||||
Calculates position foreach component in the order list
Parameters :
Returns :
void
|
createOrderArrayForComponent | ||||||||
createOrderArrayForComponent(parentInstance: any)
|
||||||||
Creates order array for component excluding the defaultControls
Parameters :
Returns :
void
|
createOrderArrayForComponentWithoutDefaultControls | ||||||||
createOrderArrayForComponentWithoutDefaultControls(parentInstance: any)
|
||||||||
Creates order array for component without exclude the default controls.
Parameters :
Returns :
void
|
dockChange | ||||||||
dockChange(component: any)
|
||||||||
calls when a component changes the value of the dock or when is called explicitly
Parameters :
Returns :
void
|
getParent | ||||||||
getParent(component: any)
|
||||||||
Gets parent from the model
Parameters :
Returns :
any
parent Instance or null |
isParentCandidate | ||||||||
isParentCandidate(component: any)
|
||||||||
Determines if component received as parameter is parent candidate
Parameters :
Returns :
boolean
True if component is a parent |
processBottom | ||||||||||||||||
processBottom(size: any, component: any, offsets: any)
|
||||||||||||||||
Process bottom dock. Should change the width and keep the height
Parameters :
Returns :
any
the new offset |
processChildrenCollection | ||||||||||||
processChildrenCollection(parentInstance: any, component: any)
|
||||||||||||
Process children collection for the component's parent
Parameters :
Returns :
void
|
processComponents | ||||||||||||||||||
processComponents(components: any, parentInstance: any, size: any, offsets: any, fillComponents: any[])
|
||||||||||||||||||
Parameters :
Returns :
void
|
processDock | ||||||||
processDock(parentInstance: any)
|
||||||||
Process the dock property for each children of the parentInstance. get the parent size, and keep the offset after render the control in the container.
Parameters :
Returns :
void
|
processDockCases | ||||||||||||||||||||||||||||
processDockCases(currentComponent: any, offsets: IOffsets, size: ISize, fillComponents: any[], elementToDelete: any[], index: number)
|
||||||||||||||||||||||||||||
Process dock cases for each case
Parameters :
Returns :
IOffsets
returns the new offsets with the new element located |
processDockInRegisterComponent | ||||||||||||
processDockInRegisterComponent(component: any, parentInstance: any)
|
||||||||||||
Process dock when the component is registering
Parameters :
Returns :
void
|
processFill | ||||||||||||||||
processFill(size: any, component: any, offsets: any)
|
||||||||||||||||
Process Fill dock. Should change the width and/or the height
Parameters :
Returns :
void
the new offset |
processFillDockAfterOtherDock | ||||||||||||||||||||
processFillDockAfterOtherDock(fillComponents: any[], parentInstance: any, size: literal type, offsets: literal type)
|
||||||||||||||||||||
Process fill dock after other dock properties.
Parameters :
Returns :
void
|
processLeft | ||||||||||||||||
processLeft(size: any, component: any, offsets: any)
|
||||||||||||||||
Process left dock. Should change the height and keep the width
Parameters :
Returns :
any
the new offset |
processNone | ||||||||
processNone(currentComponent: any)
|
||||||||
Process none dock. should return to the initial position.
Parameters :
Returns :
void
|
processOrphanComponent | ||||||||
processOrphanComponent(component: any)
|
||||||||
Process orphan component, when the component have a parent but the parent is not ready yet.
Parameters :
Returns :
void
|
processPendingParentCollection |
processPendingParentCollection()
|
Process pending parent collection Includes pending to assign parent collected items in the controls collection
Returns :
void
|
processRight | ||||||||||||||||
processRight(size: any, component: any, offsets: any)
|
||||||||||||||||
Process right dock. Should change the height and keep the width
Parameters :
Returns :
any
the new offset |
processTop | ||||||||||||||||
processTop(size: any, component: any, offsets: any)
|
||||||||||||||||
Process top dock. Should change the width and keep the height
Parameters :
Returns :
any
the new offset |
registerComponent | ||||||||
registerComponent(component: any)
|
||||||||
Registers each component of the app in the componentsCollection. Each component should be register by the ngOnInit lifecycle. The control-container-winforms-base.component and control-winforms-base.component call this method
Parameters :
Returns :
void
|
saveInitialValues | ||||||
saveInitialValues(component: any)
|
||||||
Saves initial values. used to keep the initial position of the control in case the dock return to none. try to get from the model or computed position by the browser.
Parameters :
Returns :
void
|
startDocking | ||||||||
startDocking(component: any)
|
||||||||
Starts docking from the form. use the throttling process to avoid process each time the dock.
Parameters :
Returns :
void
|
unRegisterComponent | ||||||
unRegisterComponent(component: any)
|
||||||
unregister the component from the collection. first remove the references from the parent, the remove the references from the componentsCollection
Parameters :
Returns :
void
|
anchorCalled |
Type : object
|
Default value : {}
|
Anchor called of web components service To keep tracking of anchored forms |
componentsCollection |
Type : any
|
delay |
Type : number
|
Default value : 150
|
Delay of buffer calls for the startDocking |
formsCalled |
Type : object
|
Default value : {}
|
Forms called from the components detectChanges or syncCompleted event. see more in the ngOnInit of any |
pendingParentsCollection |
Type : []
|
Default value : []
|