Browse Source

[修正] 现在4种车辆图标会在选中时切换位置并闪烁5秒,而不是非水源图标

develop
徐振升 4 years ago
parent
commit
fc5497716c
  1. 9
      src/app/working-area/working-area.component.ts

9
src/app/working-area/working-area.component.ts

@ -28,7 +28,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
/** /**
* *
*/ */
@Input( ) init: any; @Input() init: any;
/** /**
* pixijs * pixijs
*/ */
@ -243,7 +243,12 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
* @param icon * @param icon
*/ */
public moveIconToScreenCenter(icon) { public moveIconToScreenCenter(icon) {
if (icon.parent === this.backgroundImage && icon.assetData.Type !== 0) { if (icon.parent === this.backgroundImage && (
icon.assetData.Type === 1 ||
icon.assetData.Type === 2 ||
icon.assetData.Type === 3 ||
icon.assetData.Type === 4
)) {
console.log(this.backgroundImage.position); console.log(this.backgroundImage.position);
this.backgroundImage.pivot.set(icon.x, icon.y); this.backgroundImage.pivot.set(icon.x, icon.y);
this.backgroundImage.position.set(771, 404); this.backgroundImage.position.set(771, 404);

Loading…
Cancel
Save