diff --git a/src/app/key-unit/key-unit-management/key-unit-management.component.html b/src/app/key-unit/key-unit-management/key-unit-management.component.html
index ea625a8..3f25a16 100644
--- a/src/app/key-unit/key-unit-management/key-unit-management.component.html
+++ b/src/app/key-unit/key-unit-management/key-unit-management.component.html
@@ -75,11 +75,11 @@
diff --git a/src/app/ui/collection-tools-building/collection-tools.component.ts b/src/app/ui/collection-tools-building/collection-tools.component.ts
index 9c7692a..a28b8bb 100644
--- a/src/app/ui/collection-tools-building/collection-tools.component.ts
+++ b/src/app/ui/collection-tools-building/collection-tools.component.ts
@@ -17,7 +17,7 @@ import { ActivatedRoute, Router } from '@angular/router';
import { TabbarAndScoreService } from 'src/app/http-interceptors/tabbar-and-score.service';
import { MaskLayerService } from 'src/app/mask-layer.service';
import * as ObjectID from 'bson-objectid';
-
+import { AxMessageSystem } from 'src/app/working-area/model/axMessageSystem';
@Component({
selector: 'app-collection-tools-building',
templateUrl: './collection-tools.component.html',
@@ -83,9 +83,11 @@ export class CollectionToolsBuildingComponent implements OnInit {
setTimeout(() => {
obj.PropertyInfos.forEach(item => {
if(item.PropertyType == 4){
- this.gallery = new Viewer(document.getElementById('viewerjs'),{
- url: 'data-original'
- });
+ if(document.getElementById('viewerjs')){
+ this.gallery = new Viewer(document.getElementById('viewerjs'),{
+ url: 'data-original'
+ });
+ }
}
})
}, 0);
@@ -608,7 +610,67 @@ export class CollectionToolsBuildingComponent implements OnInit {
}
isediticon = true //控制查看编辑模式的编辑模式小笔按钮
+
+
+ isMultipleAsset:boolean = false//框选多个素材属性显隐
+ multipleAsset:any = {
+ Width:null,
+ Height:null,
+ Angle:null,
+ Thickness:null,
+ Color:null,
+ PropertyInfos:[]
+ }//多个素材共同属性
+ multipleAssetData:any//当前多选的素材
+ firstMultipleAssetData:any//当前多选的第一个素材
ngOnInit(): void {
+ let _this = this
+ AxMessageSystem.addListener('selectionChanged', ()=>{
+ if(this.canvas.selection.size() == 1){//如果是单选
+ this.isMultipleAsset = false
+ // console.log('单选',this.canvas.selection.first().assetData)
+ this.setAssetsProperty(this.canvas.selection.first().assetData)
+ }else if(this.canvas.selection.size()){
+ // console.log('多选')
+ this.multipleAssetData = this.canvas.selection.all()
+ this.firstMultipleAssetData = this.canvas.selection.first()
+ this.multipleAsset = {
+ Width:null,
+ Height:null,
+ Angle:null,
+ Thickness:null,
+ Color:null,
+ PropertyInfos:[]
+ }
+ this.isMultipleAsset = true
+ let firstAssetData = this.canvas.selection.first().assetData;//拿出第一个素材作为例子与其他素材进行对比
+ let InteractiveMode = firstAssetData.InteractiveMode //素材连接方式
+ let isInteractiveMode = this.canvas.selection.all().every(item => item.assetData.InteractiveMode === InteractiveMode)
+ if(isInteractiveMode){
+ this.multipleAsset.InteractiveMode = InteractiveMode
+ }
+ let isFillMode = this.canvas.selection.all().every(item => item.assetData.FillMode === 0) //素材填充方式都为0
+ if(isFillMode){
+ this.multipleAsset.FillMode = 0
+ }
+ this.canvas.selection.first().assetData.PropertyInfos.forEach(i => {
+ let index = 0
+ this.canvas.selection.all().forEach(item => {
+ item.assetData.PropertyInfos.forEach(element => {
+ if(element.PropertyName == i.PropertyName && element.PropertyType == i.PropertyType && element.PropertyType != 3 && element.PropertyType != 4){
+ index++
+ if(index == this.canvas.selection.size()){
+ let newElement = JSON.parse(JSON.stringify(element))
+ newElement.PropertyValue = ''
+ this.multipleAsset.PropertyInfos.push(newElement)
+ }
+ }
+ });
+ })
+ })
+ }
+ }, this)
+
if(this.router.url.indexOf("keyUnit/viewunitinfo") != -1){ //查看模式
this.isEditPattern = false
@@ -642,6 +704,106 @@ export class CollectionToolsBuildingComponent implements OnInit {
}
})
}
+ //多选宽度共同改变
+ multipleAssetWidthInput(){
+ this.multipleAssetData.forEach(item=>{
+ item.assetData.Width = this.multipleAsset.Width
+ this.canvas.refreshIcon(item.assetData.Id)
+ this.canvasData.isChange = true
+ })
+ }
+ //多选高度共同改变
+ multipleAssetHeightInput(){
+ this.multipleAssetData.forEach(item=>{
+ item.assetData.Height = this.multipleAsset.Height
+ this.canvas.refreshIcon(item.assetData.Id)
+ this.canvasData.isChange = true
+ })
+ }
+ //多选角度共同改变
+ multipleAssetAngleInput(){
+ this.multipleAssetData.forEach(item=>{
+ item.assetData.Angle = this.multipleAsset.Angle
+ this.canvas.refreshIcon(item.assetData.Id)
+ this.canvasData.isChange = true
+ })
+ }
+ //多选厚度共同改变
+ multipleAssetThicknessInput(){
+ this.multipleAssetData.forEach(item=>{
+ item.assetData.Thickness = this.multipleAsset.Thickness
+ this.canvas.refreshIcon(item.assetData.Id)
+ this.canvasData.isChange = true
+ })
+ }
+ //多选颜色共同改变
+ multipleSelectedcolor:any
+ multipleAssetSelectcolor(item,key){
+ //在当前透明度基础上改变颜色
+ this.multipleSelectedcolor = item
+ this.multipleAssetData.forEach(item=>{
+ item.assetData.Color = this.multipleSelectedcolor
+ this.canvasData.isChange = true
+ this.canvas.refreshIcon(item.assetData.Id)
+ })
+ }
+ //多选颜色滑竿改变
+ multipleColorDivSliderChange(){
+ let colorOpacity = Math.round(255 * this.colorDivSliderValue * 0.01)
+ //根据滑竿值改变16进制颜色后两位
+ function replacepos(text,start,stop,replacetext){
+ let mystr = text.substring(0,stop-1)+replacetext+text.substring(stop+1);
+ return mystr;
+ }
+ this.multipleAssetData.forEach(item=>{
+ this.multipleSelectedcolor = replacepos(this.multipleSelectedcolor,7,8,colorOpacity.toString(16))
+ item.assetData.Color = this.multipleSelectedcolor
+ this.canvasData.isChange = true
+ this.canvas.refreshIcon(item.assetData.Id)
+ })
+ }
+ //多选状态动态属性素材input框值改变
+ multipleAssetInputChange(i,e){
+ e.stopPropagation()
+ this.multipleAssetData.forEach(item=>{
+ // console.log(item)
+ item.assetData.PropertyInfos.forEach(element => {
+ if(element.PropertyName == i.PropertyName){
+ element.PropertyValue = i.PropertyValue
+ this.canvas.refreshIcon(item.assetData.Id)
+ this.canvasData.isChange = true
+ }
+ })
+ })
+ }
+ //多选状态动态属性素材radio框值改变
+ multipleAssetRadioChange(i,value){
+ // e.stopPropagation()
+ this.multipleAssetData.forEach(item=>{
+ // console.log(item)
+ item.assetData.PropertyInfos.forEach(element => {
+ if(element.PropertyName == i.PropertyName){
+ element.PropertyValue = value
+ this.canvas.refreshIcon(item.assetData.Id)
+ this.canvasData.isChange = true
+ }
+ })
+ })
+ }
+ //多选状态动态属性素材下拉框值改变
+ multipleSupplyArea(i,e){
+ e.stopPropagation()
+ this.multipleAssetData.forEach(item=>{
+ // console.log(item)
+ item.assetData.PropertyInfos.forEach(element => {
+ if(element.PropertyName == i.PropertyName){
+ element.PropertyValue = i.PropertyValue
+ this.canvas.refreshIcon(item.assetData.Id)
+ this.canvasData.isChange = true
+ }
+ })
+ })
+ }
diff --git a/src/app/ui/collection-tools-plan/collection-tools.component.html b/src/app/ui/collection-tools-plan/collection-tools.component.html
index 65afdc5..40aa946 100644
--- a/src/app/ui/collection-tools-plan/collection-tools.component.html
+++ b/src/app/ui/collection-tools-plan/collection-tools.component.html
@@ -153,7 +153,7 @@
属性
-
+
面积(平方米)
{{canvasData.selectStorey.area}}
详情
@@ -162,14 +162,14 @@
-
+
{{assetName}}
-
+
+
+
+
宽度(像素)
+
+
高度(像素)
+
+
角度
+
+
+
+
+
+
+
+
+
+
+
透明度
+
+
{{colorDivSliderValue}}%
+
+
+
+
+
{{item.PropertyName}}({{item.PhysicalUnit}})
+
+
+
+
+
{{item.PropertyName}}({{item.PhysicalUnit}})
+
+
+
+
+
{{item.PropertyName}}({{item.PhysicalUnit}})
+
+
+
+
+
+
+
+
+
{{item.PropertyName}}
+
+
+
+
+
{{item.PropertyName}}
+
+
+
+
diff --git a/src/app/ui/collection-tools-plan/collection-tools.component.ts b/src/app/ui/collection-tools-plan/collection-tools.component.ts
index 6a3d059..03adbaf 100644
--- a/src/app/ui/collection-tools-plan/collection-tools.component.ts
+++ b/src/app/ui/collection-tools-plan/collection-tools.component.ts
@@ -17,7 +17,7 @@ import { ActivatedRoute, Router } from '@angular/router';
import { TabbarAndScoreService } from 'src/app/http-interceptors/tabbar-and-score.service';
import { MaskLayerService } from 'src/app/mask-layer.service';
import * as ObjectID from 'bson-objectid';
-
+import { AxMessageSystem } from 'src/app/working-area/model/axMessageSystem';
@Component({
selector: 'app-collection-tools-plan',
templateUrl: './collection-tools.component.html',
@@ -83,9 +83,11 @@ export class CollectionToolsPlanComponent implements OnInit {
setTimeout(() => {
obj.PropertyInfos.forEach(item => {
if(item.PropertyType == 4){
- this.gallery = new Viewer(document.getElementById('viewerjs'),{
- url: 'data-original'
- });
+ if(document.getElementById('viewerjs')){
+ this.gallery = new Viewer(document.getElementById('viewerjs'),{
+ url: 'data-original'
+ });
+ }
}
})
}, 0);
@@ -408,7 +410,10 @@ export class CollectionToolsPlanComponent implements OnInit {
//素材是否高亮改变----->本地操作行为
assetHighLightIunput(){
-
+ // console.log(this.isHighLight,this.canvasAssetObj)
+ // let arr = []
+ // arr.push(this.canvasAssetObj.Id)
+ // this.canvas.setHighlight(arr)
}
//动态属性素材input框值改变
@@ -608,7 +613,66 @@ export class CollectionToolsPlanComponent implements OnInit {
}
isediticon = true //控制查看编辑模式的编辑模式小笔按钮
+
+ isMultipleAsset:boolean = false//框选多个素材属性显隐
+ multipleAsset:any = {
+ Width:null,
+ Height:null,
+ Angle:null,
+ Thickness:null,
+ Color:null,
+ PropertyInfos:[]
+ }//多个素材共同属性
+ multipleAssetData:any//当前多选的素材
+ firstMultipleAssetData:any//当前多选的第一个素材
ngOnInit(): void {
+ let _this = this
+ AxMessageSystem.addListener('selectionChanged', ()=>{
+ if(this.canvas.selection.size() == 1){//如果是单选
+ this.isMultipleAsset = false
+ // console.log('单选',this.canvas.selection.first().assetData)
+ this.setAssetsProperty(this.canvas.selection.first().assetData)
+ }else if(this.canvas.selection.size()){
+ // console.log('多选')
+ this.multipleAssetData = this.canvas.selection.all()
+ this.firstMultipleAssetData = this.canvas.selection.first()
+ this.multipleAsset = {
+ Width:null,
+ Height:null,
+ Angle:null,
+ Thickness:null,
+ Color:null,
+ PropertyInfos:[]
+ }
+ this.isMultipleAsset = true
+ let firstAssetData = this.canvas.selection.first().assetData;//拿出第一个素材作为例子与其他素材进行对比
+ let InteractiveMode = firstAssetData.InteractiveMode //素材连接方式
+ let isInteractiveMode = this.canvas.selection.all().every(item => item.assetData.InteractiveMode === InteractiveMode)
+ if(isInteractiveMode){
+ this.multipleAsset.InteractiveMode = InteractiveMode
+ }
+ let isFillMode = this.canvas.selection.all().every(item => item.assetData.FillMode === 0) //素材填充方式都为0
+ if(isFillMode){
+ this.multipleAsset.FillMode = 0
+ }
+ this.canvas.selection.first().assetData.PropertyInfos.forEach(i => {
+ let index = 0
+ this.canvas.selection.all().forEach(item => {
+ item.assetData.PropertyInfos.forEach(element => {
+ if(element.PropertyName == i.PropertyName && element.PropertyType == i.PropertyType && element.PropertyType != 3 && element.PropertyType != 4){
+ index++
+ if(index == this.canvas.selection.size()){
+ let newElement = JSON.parse(JSON.stringify(element))
+ newElement.PropertyValue = ''
+ this.multipleAsset.PropertyInfos.push(newElement)
+ }
+ }
+ });
+ })
+ })
+ // console.log(666,_this.multipleAsset.PropertyInfos)
+ }
+ }, this)
if(this.router.url.indexOf("keyUnit/viewunitinfo") != -1){ //查看模式
this.isEditPattern = false
@@ -642,6 +706,106 @@ export class CollectionToolsPlanComponent implements OnInit {
}
})
}
+ //多选宽度共同改变
+ multipleAssetWidthInput(){
+ this.multipleAssetData.forEach(item=>{
+ item.assetData.Width = this.multipleAsset.Width
+ this.canvas.refreshIcon(item.assetData.Id)
+ this.canvasData.isChange = true
+ })
+ }
+ //多选高度共同改变
+ multipleAssetHeightInput(){
+ this.multipleAssetData.forEach(item=>{
+ item.assetData.Height = this.multipleAsset.Height
+ this.canvas.refreshIcon(item.assetData.Id)
+ this.canvasData.isChange = true
+ })
+ }
+ //多选角度共同改变
+ multipleAssetAngleInput(){
+ this.multipleAssetData.forEach(item=>{
+ item.assetData.Angle = this.multipleAsset.Angle
+ this.canvas.refreshIcon(item.assetData.Id)
+ this.canvasData.isChange = true
+ })
+ }
+ //多选厚度共同改变
+ multipleAssetThicknessInput(){
+ this.multipleAssetData.forEach(item=>{
+ item.assetData.Thickness = this.multipleAsset.Thickness
+ this.canvas.refreshIcon(item.assetData.Id)
+ this.canvasData.isChange = true
+ })
+ }
+ //多选颜色共同改变
+ multipleSelectedcolor:any
+ multipleAssetSelectcolor(item,key){
+ //在当前透明度基础上改变颜色
+ this.multipleSelectedcolor = item
+ this.multipleAssetData.forEach(item=>{
+ item.assetData.Color = this.multipleSelectedcolor
+ this.canvasData.isChange = true
+ this.canvas.refreshIcon(item.assetData.Id)
+ })
+ }
+ //多选颜色滑竿改变
+ multipleColorDivSliderChange(){
+ let colorOpacity = Math.round(255 * this.colorDivSliderValue * 0.01)
+ //根据滑竿值改变16进制颜色后两位
+ function replacepos(text,start,stop,replacetext){
+ let mystr = text.substring(0,stop-1)+replacetext+text.substring(stop+1);
+ return mystr;
+ }
+ this.multipleAssetData.forEach(item=>{
+ this.multipleSelectedcolor = replacepos(this.multipleSelectedcolor,7,8,colorOpacity.toString(16))
+ item.assetData.Color = this.multipleSelectedcolor
+ this.canvasData.isChange = true
+ this.canvas.refreshIcon(item.assetData.Id)
+ })
+ }
+ //多选状态动态属性素材input框值改变
+ multipleAssetInputChange(i,e){
+ e.stopPropagation()
+ this.multipleAssetData.forEach(item=>{
+ // console.log(item)
+ item.assetData.PropertyInfos.forEach(element => {
+ if(element.PropertyName == i.PropertyName){
+ element.PropertyValue = i.PropertyValue
+ this.canvas.refreshIcon(item.assetData.Id)
+ this.canvasData.isChange = true
+ }
+ })
+ })
+ }
+ //多选状态动态属性素材radio框值改变
+ multipleAssetRadioChange(i,value){
+ // e.stopPropagation()
+ this.multipleAssetData.forEach(item=>{
+ // console.log(item)
+ item.assetData.PropertyInfos.forEach(element => {
+ if(element.PropertyName == i.PropertyName){
+ element.PropertyValue = value
+ this.canvas.refreshIcon(item.assetData.Id)
+ this.canvasData.isChange = true
+ }
+ })
+ })
+ }
+ //多选状态动态属性素材下拉框值改变
+ multipleSupplyArea(i,e){
+ e.stopPropagation()
+ this.multipleAssetData.forEach(item=>{
+ // console.log(item)
+ item.assetData.PropertyInfos.forEach(element => {
+ if(element.PropertyName == i.PropertyName){
+ element.PropertyValue = i.PropertyValue
+ this.canvas.refreshIcon(item.assetData.Id)
+ this.canvasData.isChange = true
+ }
+ })
+ })
+ }
@@ -650,11 +814,11 @@ export class CollectionToolsPlanComponent implements OnInit {
if(this.router.url.indexOf("gis") == -1) {
this.getSitePlan()
}
- // 监听canvas组件选中素材事件
- this.canvas.on("select",obj=>{
- //选中素材属性注入函数
- this.setAssetsProperty(obj.assetData)
- })
+ // // 监听canvas组件选中素材事件
+ // this.canvas.on("select",obj=>{
+ // //选中素材属性注入函数
+ // this.setAssetsProperty(obj.assetData)
+ // })
// 监听canvas组件取消选中素材事件
this.canvas.on("deselect",obj=>{
this.isShowProperty = false
diff --git a/src/app/ui/collection-tools/collection-tools.component.html b/src/app/ui/collection-tools/collection-tools.component.html
index 56cd5d5..0a3bee0 100644
--- a/src/app/ui/collection-tools/collection-tools.component.html
+++ b/src/app/ui/collection-tools/collection-tools.component.html
@@ -227,7 +227,7 @@
-
+
{{assetName}}
-
+
+
+
+
宽度(像素)
+
+
高度(像素)
+
+
角度
+
+
+
+
+
+
+
+
+
+
+
透明度
+
+
{{colorDivSliderValue}}%
+
+
+
+
+
{{item.PropertyName}}({{item.PhysicalUnit}})
+
+
+
+
+
{{item.PropertyName}}({{item.PhysicalUnit}})
+
+
+
+
+
{{item.PropertyName}}({{item.PhysicalUnit}})
+
+
+
+
+
+
+
+
+
{{item.PropertyName}}
+
+
+
+
+
{{item.PropertyName}}
+
+
+
+
diff --git a/src/app/ui/collection-tools/collection-tools.component.ts b/src/app/ui/collection-tools/collection-tools.component.ts
index 93c93c0..b453523 100644
--- a/src/app/ui/collection-tools/collection-tools.component.ts
+++ b/src/app/ui/collection-tools/collection-tools.component.ts
@@ -16,7 +16,7 @@ import { GameMode } from 'src/app/working-area/model/gameMode';
import { ActivatedRoute, Router } from '@angular/router';
import { MaskLayerService } from 'src/app/mask-layer.service';
import * as ObjectID from 'bson-objectid';
-
+import { AxMessageSystem } from 'src/app/working-area/model/axMessageSystem';
@Component({
selector: 'app-collection-tools',
templateUrl: './collection-tools.component.html',
@@ -82,9 +82,11 @@ export class CollectionToolsComponent implements OnInit {
setTimeout(() => {
obj.PropertyInfos.forEach(item => {
if(item.PropertyType == 4){
- this.gallery = new Viewer(document.getElementById('viewerjs'),{
- url: 'data-original'
- });
+ if(document.getElementById('viewerjs')){
+ this.gallery = new Viewer(document.getElementById('viewerjs'),{
+ url: 'data-original'
+ });
+ }
}
})
}, 0);
@@ -619,7 +621,64 @@ export class CollectionToolsComponent implements OnInit {
this.canvasData.isChange = true
}
+ isMultipleAsset:boolean = false//框选多个素材属性显隐
+ multipleAsset:any = {
+ Width:null,
+ Height:null,
+ Angle:null,
+ Thickness:null,
+ Color:null,
+ PropertyInfos:[]
+ }//多个素材共同属性
+ multipleAssetData:any//当前多选的素材
+ firstMultipleAssetData:any//当前多选的第一个素材
ngOnInit(): void {
+ let _this = this
+ AxMessageSystem.addListener('selectionChanged', ()=>{
+ if(this.canvas.selection.size() == 1){//如果是单选
+ this.isMultipleAsset = false
+ // console.log('单选',this.canvas.selection.first().assetData)
+ this.setAssetsProperty(this.canvas.selection.first().assetData)
+ }else if(this.canvas.selection.size()){
+ // console.log('多选')
+ this.multipleAssetData = this.canvas.selection.all()
+ this.firstMultipleAssetData = this.canvas.selection.first()
+ this.multipleAsset = {
+ Width:null,
+ Height:null,
+ Angle:null,
+ Thickness:null,
+ Color:null,
+ PropertyInfos:[]
+ }
+ this.isMultipleAsset = true
+ let firstAssetData = this.canvas.selection.first().assetData;//拿出第一个素材作为例子与其他素材进行对比
+ let InteractiveMode = firstAssetData.InteractiveMode //素材连接方式
+ let isInteractiveMode = this.canvas.selection.all().every(item => item.assetData.InteractiveMode === InteractiveMode)
+ if(isInteractiveMode){
+ this.multipleAsset.InteractiveMode = InteractiveMode
+ }
+ let isFillMode = this.canvas.selection.all().every(item => item.assetData.FillMode === 0) //素材填充方式都为0
+ if(isFillMode){
+ this.multipleAsset.FillMode = 0
+ }
+ this.canvas.selection.first().assetData.PropertyInfos.forEach(i => {
+ let index = 0
+ this.canvas.selection.all().forEach(item => {
+ item.assetData.PropertyInfos.forEach(element => {
+ if(element.PropertyName == i.PropertyName && element.PropertyType == i.PropertyType && element.PropertyType != 3 && element.PropertyType != 4){
+ index++
+ if(index == this.canvas.selection.size()){
+ let newElement = JSON.parse(JSON.stringify(element))
+ newElement.PropertyValue = ''
+ this.multipleAsset.PropertyInfos.push(newElement)
+ }
+ }
+ });
+ })
+ })
+ }
+ }, this)
this.canvasData.gameMode = GameMode.Assignment
if (sessionStorage.getItem('editable') == "0") { //查看模式
@@ -649,7 +708,106 @@ export class CollectionToolsComponent implements OnInit {
}
-
+ //多选宽度共同改变
+ multipleAssetWidthInput(){
+ this.multipleAssetData.forEach(item=>{
+ item.assetData.Width = this.multipleAsset.Width
+ this.canvas.refreshIcon(item.assetData.Id)
+ this.canvasData.isChange = true
+ })
+ }
+ //多选高度共同改变
+ multipleAssetHeightInput(){
+ this.multipleAssetData.forEach(item=>{
+ item.assetData.Height = this.multipleAsset.Height
+ this.canvas.refreshIcon(item.assetData.Id)
+ this.canvasData.isChange = true
+ })
+ }
+ //多选角度共同改变
+ multipleAssetAngleInput(){
+ this.multipleAssetData.forEach(item=>{
+ item.assetData.Angle = this.multipleAsset.Angle
+ this.canvas.refreshIcon(item.assetData.Id)
+ this.canvasData.isChange = true
+ })
+ }
+ //多选厚度共同改变
+ multipleAssetThicknessInput(){
+ this.multipleAssetData.forEach(item=>{
+ item.assetData.Thickness = this.multipleAsset.Thickness
+ this.canvas.refreshIcon(item.assetData.Id)
+ this.canvasData.isChange = true
+ })
+ }
+ //多选颜色共同改变
+ multipleSelectedcolor:any
+ multipleAssetSelectcolor(item,key){
+ //在当前透明度基础上改变颜色
+ this.multipleSelectedcolor = item
+ this.multipleAssetData.forEach(item=>{
+ item.assetData.Color = this.multipleSelectedcolor
+ this.canvasData.isChange = true
+ this.canvas.refreshIcon(item.assetData.Id)
+ })
+ }
+ //多选颜色滑竿改变
+ multipleColorDivSliderChange(){
+ let colorOpacity = Math.round(255 * this.colorDivSliderValue * 0.01)
+ //根据滑竿值改变16进制颜色后两位
+ function replacepos(text,start,stop,replacetext){
+ let mystr = text.substring(0,stop-1)+replacetext+text.substring(stop+1);
+ return mystr;
+ }
+ this.multipleAssetData.forEach(item=>{
+ this.multipleSelectedcolor = replacepos(this.multipleSelectedcolor,7,8,colorOpacity.toString(16))
+ item.assetData.Color = this.multipleSelectedcolor
+ this.canvasData.isChange = true
+ this.canvas.refreshIcon(item.assetData.Id)
+ })
+ }
+ //多选状态动态属性素材input框值改变
+ multipleAssetInputChange(i,e){
+ e.stopPropagation()
+ this.multipleAssetData.forEach(item=>{
+ // console.log(item)
+ item.assetData.PropertyInfos.forEach(element => {
+ if(element.PropertyName == i.PropertyName){
+ element.PropertyValue = i.PropertyValue
+ this.canvas.refreshIcon(item.assetData.Id)
+ this.canvasData.isChange = true
+ }
+ })
+ })
+ }
+ //多选状态动态属性素材radio框值改变
+ multipleAssetRadioChange(i,value){
+ // e.stopPropagation()
+ this.multipleAssetData.forEach(item=>{
+ // console.log(item)
+ item.assetData.PropertyInfos.forEach(element => {
+ if(element.PropertyName == i.PropertyName){
+ element.PropertyValue = value
+ this.canvas.refreshIcon(item.assetData.Id)
+ this.canvasData.isChange = true
+ }
+ })
+ })
+ }
+ //多选状态动态属性素材下拉框值改变
+ multipleSupplyArea(i,e){
+ e.stopPropagation()
+ this.multipleAssetData.forEach(item=>{
+ // console.log(item)
+ item.assetData.PropertyInfos.forEach(element => {
+ if(element.PropertyName == i.PropertyName){
+ element.PropertyValue = i.PropertyValue
+ this.canvas.refreshIcon(item.assetData.Id)
+ this.canvasData.isChange = true
+ }
+ })
+ })
+ }
ngAfterViewInit(): void {
this.getSitePlan()
diff --git a/src/app/working-area/model/axSelection.ts b/src/app/working-area/model/axSelection.ts
index ce7a6e0..8bd6400 100644
--- a/src/app/working-area/model/axSelection.ts
+++ b/src/app/working-area/model/axSelection.ts
@@ -8,7 +8,7 @@ export class AxSelection {
// 获得第一个对象
public first(): any {
if (this.objects.size > 0) {
- return this.objects[0];
+ return [...this.objects][0];
} else {
return null;
}
@@ -19,7 +19,7 @@ export class AxSelection {
}
// 获得所有对象
public all() {
- return this.objects;
+ return [...this.objects];
}
// 获取集合长度
public size(): number {
diff --git a/src/app/working-area/working-area.component.ts b/src/app/working-area/working-area.component.ts
index 30d61ec..5cc6f48 100644
--- a/src/app/working-area/working-area.component.ts
+++ b/src/app/working-area/working-area.component.ts
@@ -151,7 +151,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
* RC版: 该版本已经相当成熟了,基本上不存在导致错误的BUG,与即将发行的正式版相差无几。
* Release版: 该版本意味“最终版本”,在前面版本的一系列测试版之后,终归会有一个正式版本,是最终交付用户使用的一个版本。该版本有时也称为标准版。一般情况下,Release不会以单词形式出现在软件封面上,取而代之的是符号®。
*/
- public VERSION = '1.0.12.20210125_beta';
+ public VERSION = '1.0.13.20210126_beta';
/**
* 数据初始化
*/
@@ -159,13 +159,13 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
PIXI.utils.skipHello();
this.sayHello();
this.eventManager.addGlobalEventListener('window', 'keydown', (event: any) => {
- event.stopPropagation()
+ event.stopPropagation();
if (event.keyCode === 17) {
this.isCtrlKeyClicked = true;
}
});
this.eventManager.addGlobalEventListener('window', 'keyup', (event: any) => {
- event.stopPropagation()
+ event.stopPropagation();
if (event.keyCode === 17) {
this.isCtrlKeyClicked = false;
this.rectToolGraphics.visible = false;
@@ -181,7 +181,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
* 删除选中的图标
*/
public deleteSelectedShape() {
- if (this.selection.all().size > 0) {
+ if (this.selection.size() > 0) {
this.selection.all().forEach(axShape => {
if (this.allowEdit && this.canvasData.gameMode === axShape.assetData.GameMode) {
// 删除图例对象
@@ -453,7 +453,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
*/
public refreshIcon(id: string): void {
const icon = this.backgroundImage.children.find(item => item.name === id);
- console.log(icon);
+ // console.log(icon);
if (icon instanceof AxImageShape) {
icon.refresh();
} else if (icon instanceof MultipointIcon) {