2019-12-09 20:14:50 +02:00
|
|
|
<!--
|
|
|
|
|
|
|
|
|
|
Copyright © 2016-2019 The Thingsboard Authors
|
|
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
|
limitations under the License.
|
|
|
|
|
|
|
|
|
|
-->
|
|
|
|
|
<div
|
|
|
|
|
(dblclick)="userNodeCallbacks.doubleClick($event, node)"
|
|
|
|
|
(mousedown)="userNodeCallbacks.mouseDown($event, node)"
|
|
|
|
|
(mouseenter)="userNodeCallbacks.mouseEnter($event, node)"
|
|
|
|
|
(mouseleave)="userNodeCallbacks.mouseLeave($event, node)">
|
|
|
|
|
<div class="{{flowchartConstants.nodeOverlayClass}}"></div>
|
|
|
|
|
<div class="tb-rule-node {{node.nodeClass}}" [ngClass]="{'tb-rule-node-highlighted' : node.highlighted, 'tb-rule-node-invalid': node.error }">
|
2019-12-12 19:55:17 +02:00
|
|
|
<mat-icon *ngIf="!iconUrl" fxFlex="15">{{node.icon}}</mat-icon>
|
|
|
|
|
<img *ngIf="iconUrl" fxFlex="15" [src]="iconUrl"/>
|
2019-12-09 20:14:50 +02:00
|
|
|
<div fxLayout="column" fxFlex="85" fxLayoutAlign="center">
|
|
|
|
|
<span class="tb-node-type">{{ node.component.name }}</span>
|
|
|
|
|
<span class="tb-node-title" *ngIf="node.name">{{ node.name }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="{{flowchartConstants.leftConnectorClass}}">
|
|
|
|
|
<div fc-magnet [connector]="connector" [callbacks]="callbacks"
|
|
|
|
|
*ngFor="let connector of modelservice.nodes.getConnectorsByType(node, flowchartConstants.leftConnectorType)">
|
|
|
|
|
<div fc-connector [connector]="connector"
|
|
|
|
|
[mouseOverConnector]="mouseOverConnector"
|
|
|
|
|
[callbacks]="callbacks"
|
|
|
|
|
[modelservice]="modelservice"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="{{flowchartConstants.rightConnectorClass}}">
|
|
|
|
|
<div fc-magnet [connector]="connector" [callbacks]="callbacks"
|
|
|
|
|
*ngFor="let connector of modelservice.nodes.getConnectorsByType(node, flowchartConstants.rightConnectorType)">
|
|
|
|
|
<div fc-connector [connector]="connector"
|
|
|
|
|
[mouseOverConnector]="mouseOverConnector"
|
|
|
|
|
[callbacks]="callbacks"
|
|
|
|
|
[modelservice]="modelservice"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div *ngIf="modelservice.isEditable() && !node.readonly" class="fc-nodeedit" (click)="userNodeCallbacks.nodeEdit($event, node)">
|
|
|
|
|
<i class="fa fa-pencil" aria-hidden="true"></i>
|
|
|
|
|
</div>
|
|
|
|
|
<div *ngIf="modelservice.isEditable() && !node.readonly" class="fc-nodedelete" (click)="modelservice.nodes.delete(node)">
|
|
|
|
|
×
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|