src/app/shared/flo/handle/handle.component.ts
Component for displaying application properties and capturing their values.
encapsulation | ViewEncapsulation.None |
selector | app-flo-handle |
templateUrl | handle.component.html |
tooltipText |
gettooltipText()
|
Returns :
string
|
placement |
getplacement()
|
Returns :
string
|
import { Component, ViewEncapsulation } from '@angular/core';
import { Constants } from 'spring-flo';
import { ElementComponent } from '../support/shape-component';
/**
* Component for displaying application properties and capturing their values.
*
* @author Alex Boyko
* @author Andy Clement
*/
@Component({
selector: 'app-flo-handle',
templateUrl: 'handle.component.html',
encapsulation: ViewEncapsulation.None
})
export class HandleComponent extends ElementComponent {
get tooltipText(): string {
if (this.view) {
switch (this.view.model.attr('./kind')) {
case Constants.REMOVE_HANDLE_TYPE:
return 'Remove Element';
case Constants.PROPERTIES_HANDLE_TYPE:
return 'Edit Properties';
}
}
}
get placement(): string {
if (this.view) {
switch (this.view.model.attr('./kind')) {
case Constants.REMOVE_HANDLE_TYPE:
return 'bottom';
case Constants.PROPERTIES_HANDLE_TYPE:
return 'bottom';
}
}
return 'top';
}
}
<svg:g class="rotatable" [tooltip]="tooltipText" [placement]="placement" container="body">
<svg:g class="scalable">
<svg:image/>
</svg:g>
</svg:g>