Browse Source

[新增]增加多点连线素材厚度输入框

develop
邵佳豪 4 years ago
parent
commit
66aa787ec2
  1. 18
      src/app/ui/collection-tools/collection-tools.component.html
  2. 12
      src/app/ui/collection-tools/collection-tools.component.ts

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

@ -165,11 +165,11 @@
<div class="assetsproperty" style="user-select: none" *ngIf="isShowProperty && !isShowAttribute">
<h3 style="text-align: center;font-weight: 900;">{{assetName}}</h3>
<div>
<div *ngIf="canvasAssetObj.InteractiveMode == 0">
<p>宽度(像素)</p>
<input type="text" class="biginput" [(ngModel)]="assetWidth" (input)="assetWidthIunput()" [disabled]="!isEditPattern || canvasAssetObj.FillMode != 1">
<input type="text" class="biginput" [(ngModel)]="assetWidth" (input)="assetWidthIunput()" [disabled]="!isEditPattern">
<p>高度(像素)</p>
<input type="text" class="biginput" [(ngModel)]="assetHeight" (input)="assetHeightIunput()" [disabled]="!isEditPattern || canvasAssetObj.FillMode != 1">
<input type="text" class="biginput" [(ngModel)]="assetHeight" (input)="assetHeightIunput()" [disabled]="!isEditPattern">
<p>角度</p>
<div style="width: 100%;display: flex;vertical-align: top;height: 22px;">
<input type="number" class="smallinput" [(ngModel)]="sliderValue"
@ -178,7 +178,17 @@
[(ngModel)]="sliderValue" (change)="assetAngleIunput()" [disabled]="!isEditPattern"></mat-slider>
</div>
</div>
<!-- 如果是多点连线 -->
<div *ngIf="canvasAssetObj.InteractiveMode == 1">
<p>厚度</p>
<div style="width: 100%;display: flex;vertical-align: top;height: 22px;">
<input type="number" class="smallinput" [(ngModel)]="sliderValueThickness"
oninput="if(value>999)value=999;if(value<0)value=0;" (input)="assetThicknessIunput()" [disabled]="!isEditPattern">
<mat-slider color="primary" min="0" max="999" step="1" style="bottom: 12px;left: 2px;width: 70%;"
[(ngModel)]="sliderValueThickness" (change)="assetThicknessIunput()" [disabled]="!isEditPattern"></mat-slider>
</div>
</div>
<p style="margin-top: 4px;margin-bottom: 0px;">是否高亮</p>
<div>
<input class="input" [(ngModel)]="isHighLight" type="checkbox" [disabled]="!isEditPattern">

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

@ -53,7 +53,8 @@ export class CollectionToolsComponent implements OnInit {
assetName:String//素材名称
assetWidth:number//素材宽度
assetHeight:number//素材高度
sliderValue:number = 0//滑竿的值
sliderValue:number = 0//角度滑竿的值
sliderValueThickness:number = 0//厚度滑竿的值
isHighLight:boolean = false//是否高亮选择框
PropertyInfos = [] //去除图片链接真正用于循环的内容
imagesArrNum //素材属性图片数量上限
@ -85,7 +86,7 @@ export class CollectionToolsComponent implements OnInit {
this.sliderValue = obj.Angle
this.selectedcolor = obj.Color
this.PropertyInfos = obj.PropertyInfos
this.sliderValueThickness = obj.Thickness
this.PropertyInfos.forEach(item => {
if(item.PropertyType == 3){ //如果是图片链接类型
this.imagesArr.push(item)
@ -184,6 +185,13 @@ export class CollectionToolsComponent implements OnInit {
this.canvas.refresh()
}
//素材厚度输入框改变
assetThicknessIunput(){
this.canvasAssetObj.Thickness = this.sliderValueThickness
this.canvasData.isChange = true
this.canvas.refresh()
}
//素材是否高亮改变----->本地操作行为
assetHighLightIunput(){

Loading…
Cancel
Save