Browse Source

[新增]点击消防要素使素材高亮

develop
邵佳豪 4 years ago
parent
commit
fedb3c0a01
  1. 5
      src/app/ui/collection-tools/collection-tools.component.html
  2. 17
      src/app/ui/collection-tools/collection-tools.component.ts

5
src/app/ui/collection-tools/collection-tools.component.html

@ -1,5 +1,4 @@
<div class="content">
<!-- header头部 -->
<div class="header">
<button mat-button (click)="toggle()">
@ -192,7 +191,7 @@
</div>
</div>
<div class="colorDiv" *ngIf="!isEditPattern">
<div class="colorDiv" *ngIf="isEditPattern">
<ul>
<li (click)="selectcolor(item,key)" class="colorLi" *ngFor="let item of colors,let key=index" [style]="{'background-color':item}"></li>
</ul>
@ -223,7 +222,7 @@
<div style="position: relative;width: 100%;height: 21px;margin: 1px 0;">
<p style="width: 40%;display: inline-block;">{{item.PropertyName}}</p>
<span style="width: 26%;text-align:right;font-size: 13px;">{{imagesArr.length ? imagesArr.length : 0}} / {{item.PropertyValue}}</span>
<input [disabled]="!isEditPattern" *ngIf="isImgNumCss" accept="image/*" (change)="selectFile($event)" type="file" style="width: 33%;position: absolute;right: 10px;top: 1px;opacity: 0;z-index: 100;cursor: pointer;">
<input [disabled]="!isEditPattern" *ngIf="isImgNumCss" accept="image/*" (change)="selectFile($event)" type="file" style="width: 33%;position: absolute;right: 10px;top: 1px;opacity: 0;z-index: 100;cursor: pointer;height: 21px;">
<div style="width: 33%;height: 21px;line-height: 21px;text-align: center;position: absolute;right: 10px;top: 1px;z-index: 99;border: 1px solid rgb(208, 211, 214);border-radius: 2px;font-size: 13px;cursor: pointer;" (click)="imgNumBeyond()">添加</div>

17
src/app/ui/collection-tools/collection-tools.component.ts

@ -637,6 +637,23 @@ export class CollectionToolsComponent implements OnInit {
}else if(this.canvasData.originaleveryStoreyData.data[node.id]){
this.setAssetsProperty(this.canvasData.originaleveryStoreyData.data[node.id])
}
//canvas上的素材高亮
let iconHighLightArr:any = []
if(node.isTemplate){//如果是模板,则开始向下找
node.children.forEach(item => {
if(item.isTemplate){//如果子节点依旧是模板,则继续开始向下找
item.children.forEach(i => {
iconHighLightArr.push(i.Id)
})
}else{
iconHighLightArr.push(item.Id)
}
})
}else{
iconHighLightArr.push(node.id)
}
this.canvas.setHighlight(iconHighLightArr)
}
//点击数节点的显示隐藏icon

Loading…
Cancel
Save