|
|
@ -1,4 +1,6 @@ |
|
|
|
import { Constructor } from '@angular/material/core/common-behaviors/constructor'; |
|
|
|
import { Constructor } from '@angular/material/core/common-behaviors/constructor'; |
|
|
|
|
|
|
|
import { MatGridTileHeaderCssMatStyler } from '@angular/material/grid-list'; |
|
|
|
|
|
|
|
import { DefaultProxy } from 'cesium'; |
|
|
|
import { Sprite, Texture,Text, Graphics, Point } from 'pixi.js'; |
|
|
|
import { Sprite, Texture,Text, Graphics, Point } from 'pixi.js'; |
|
|
|
import { WorkingAreaComponent } from '../working-area.component'; |
|
|
|
import { WorkingAreaComponent } from '../working-area.component'; |
|
|
|
import { AxShape } from './axShape'; |
|
|
|
import { AxShape } from './axShape'; |
|
|
@ -10,6 +12,14 @@ export class AxLegend extends AxShape { |
|
|
|
// 数据
|
|
|
|
// 数据
|
|
|
|
public shapeMap: Map<string,Legend> = new Map<string,Legend>(); |
|
|
|
public shapeMap: Map<string,Legend> = new Map<string,Legend>(); |
|
|
|
pen: Graphics = new Graphics(); |
|
|
|
pen: Graphics = new Graphics(); |
|
|
|
|
|
|
|
// up: Sprite = new Sprite(this.pointTexture);
|
|
|
|
|
|
|
|
// down: Sprite= new Sprite(this.pointTexture);
|
|
|
|
|
|
|
|
// left: Sprite= new Sprite(this.pointTexture);
|
|
|
|
|
|
|
|
// right: Sprite= new Sprite(this.pointTexture);
|
|
|
|
|
|
|
|
upLeft: Sprite= new Sprite(this.pointTexture); |
|
|
|
|
|
|
|
upRight: Sprite= new Sprite(this.pointTexture); |
|
|
|
|
|
|
|
downLeft: Sprite= new Sprite(this.pointTexture); |
|
|
|
|
|
|
|
downRight: Sprite= new Sprite(this.pointTexture); |
|
|
|
/** |
|
|
|
/** |
|
|
|
* |
|
|
|
* |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -17,7 +27,12 @@ export class AxLegend extends AxShape { |
|
|
|
super(assetData, workingArea); |
|
|
|
super(assetData, workingArea); |
|
|
|
this.angle = -this.workingArea.backgroundImage.angle; |
|
|
|
this.angle = -this.workingArea.backgroundImage.angle; |
|
|
|
this.name = this.assetData.Id; |
|
|
|
this.name = this.assetData.Id; |
|
|
|
|
|
|
|
this.pivot.set(this.assetData.PivotX, this.assetData.PivotY); |
|
|
|
|
|
|
|
this.x = this.assetData.Point.x; |
|
|
|
|
|
|
|
this.y = this.assetData.Point.y; |
|
|
|
|
|
|
|
this.scale.set(this.assetData.Scale); |
|
|
|
this.shapeMap = shapeMap; |
|
|
|
this.shapeMap = shapeMap; |
|
|
|
|
|
|
|
this.createPoint(); |
|
|
|
this.refresh(); |
|
|
|
this.refresh(); |
|
|
|
} |
|
|
|
} |
|
|
|
// 添加数据
|
|
|
|
// 添加数据
|
|
|
@ -101,7 +116,331 @@ export class AxLegend extends AxShape { |
|
|
|
this.pen.endFill(); |
|
|
|
this.pen.endFill(); |
|
|
|
}
|
|
|
|
}
|
|
|
|
this.addChild(this.pen); |
|
|
|
this.addChild(this.pen); |
|
|
|
|
|
|
|
// 添加border
|
|
|
|
|
|
|
|
this.addChild(this.border); |
|
|
|
|
|
|
|
// 添加控制点
|
|
|
|
|
|
|
|
this.addChild(this.upLeft); |
|
|
|
|
|
|
|
this.addChild(this.upRight); |
|
|
|
|
|
|
|
this.addChild(this.downLeft); |
|
|
|
|
|
|
|
this.addChild(this.downRight); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.angle = -this.workingArea.backgroundImage.angle; |
|
|
|
this.angle = -this.workingArea.backgroundImage.angle; |
|
|
|
|
|
|
|
this.drawBorder(1 / this.workingArea.backgroundImage.scale.x); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public createPoint() { |
|
|
|
|
|
|
|
// this.addChild(this.upLeft);
|
|
|
|
|
|
|
|
this.upLeft.anchor.set(0.5); |
|
|
|
|
|
|
|
this.upLeft.interactive = true; |
|
|
|
|
|
|
|
this.upLeft.visible = false; |
|
|
|
|
|
|
|
this.upLeft |
|
|
|
|
|
|
|
.on('pointerdown', event => { |
|
|
|
|
|
|
|
event.stopPropagation(); |
|
|
|
|
|
|
|
event.currentTarget.data = event.data; |
|
|
|
|
|
|
|
event.currentTarget.alpha = 0.5; |
|
|
|
|
|
|
|
event.currentTarget.dragging = true; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
event.currentTarget.dragPoint = event.data.getLocalPosition(event.currentTarget.parent); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var pointStart = this.position; |
|
|
|
|
|
|
|
var pointEnd = this.workingArea.backgroundImage.toLocal(this.toGlobal(this.downRight.position)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const delX = pointEnd.x - pointStart.x; |
|
|
|
|
|
|
|
const delY = pointEnd.y - pointStart.y; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.pivot.set(this.downRight.x, this.downRight.y); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.position.x += delX; |
|
|
|
|
|
|
|
this.position.y += delY; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.assetData.PivotX = this.pivot.x; |
|
|
|
|
|
|
|
this.assetData.PivotY = this.pivot.y; |
|
|
|
|
|
|
|
this.assetData.Point = new Point(this.x, this.y); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.on('pointerup', event => { |
|
|
|
|
|
|
|
if (event.currentTarget.dragging) { |
|
|
|
|
|
|
|
event.currentTarget.alpha = 1; |
|
|
|
|
|
|
|
event.currentTarget.dragging = false; |
|
|
|
|
|
|
|
event.currentTarget.data = null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.on('pointerupoutside', event => { |
|
|
|
|
|
|
|
if (event.currentTarget.dragging) { |
|
|
|
|
|
|
|
event.currentTarget.alpha = 1; |
|
|
|
|
|
|
|
event.currentTarget.dragging = false; |
|
|
|
|
|
|
|
event.currentTarget.data = null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.on('pointermove', event => { |
|
|
|
|
|
|
|
if (event.currentTarget.dragging) { |
|
|
|
|
|
|
|
const newPosition = event.currentTarget.data.getLocalPosition(event.currentTarget.parent); |
|
|
|
|
|
|
|
var startPos = this.position; |
|
|
|
|
|
|
|
var endPos = this.workingArea.backgroundImage.toLocal(this.toGlobal(newPosition)); |
|
|
|
|
|
|
|
var width = (endPos.x - startPos.x);
|
|
|
|
|
|
|
|
var height = (endPos.y - startPos.y); |
|
|
|
|
|
|
|
var scaleX = width / (this.width / this.scale.x); |
|
|
|
|
|
|
|
var scaleY = height / (this.width / this.scale.x); |
|
|
|
|
|
|
|
var angle = Math.abs(this.angle); |
|
|
|
|
|
|
|
console.log(angle); |
|
|
|
|
|
|
|
if (angle === 0) { |
|
|
|
|
|
|
|
this.scale.set(-scaleX); |
|
|
|
|
|
|
|
} else if (angle === 90) { |
|
|
|
|
|
|
|
this.scale.set(scaleY); |
|
|
|
|
|
|
|
} else if (angle === 180) {
|
|
|
|
|
|
|
|
this.scale.set(scaleX); |
|
|
|
|
|
|
|
} else if (angle === 270) { |
|
|
|
|
|
|
|
this.scale.set(-scaleY); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.assetData.Scale = this.scale.x; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.on('rightclick', event => { |
|
|
|
|
|
|
|
this.border.visible = false; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
// this.addChild(this.upRight);
|
|
|
|
|
|
|
|
this.upRight.anchor.set(0.5); |
|
|
|
|
|
|
|
this.upRight.interactive = true; |
|
|
|
|
|
|
|
this.upRight.visible = false; |
|
|
|
|
|
|
|
this.upRight |
|
|
|
|
|
|
|
.on('pointerdown', event => { |
|
|
|
|
|
|
|
event.stopPropagation(); |
|
|
|
|
|
|
|
event.currentTarget.data = event.data; |
|
|
|
|
|
|
|
event.currentTarget.alpha = 0.5; |
|
|
|
|
|
|
|
event.currentTarget.dragging = true; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
event.currentTarget.dragPoint = event.data.getLocalPosition(event.currentTarget.parent); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var pointStart = this.position; |
|
|
|
|
|
|
|
var pointEnd = this.workingArea.backgroundImage.toLocal(this.toGlobal(this.downLeft.position)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const delX = pointEnd.x - pointStart.x; |
|
|
|
|
|
|
|
const delY = pointEnd.y - pointStart.y; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.pivot.set(this.downLeft.x, this.downLeft.y); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.position.x += delX; |
|
|
|
|
|
|
|
this.position.y += delY; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.assetData.PivotX = this.pivot.x; |
|
|
|
|
|
|
|
this.assetData.PivotY = this.pivot.y; |
|
|
|
|
|
|
|
this.assetData.Point = new Point(this.x, this.y); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.on('pointerup', event => { |
|
|
|
|
|
|
|
if (event.currentTarget.dragging) { |
|
|
|
|
|
|
|
event.currentTarget.alpha = 1; |
|
|
|
|
|
|
|
event.currentTarget.dragging = false; |
|
|
|
|
|
|
|
event.currentTarget.data = null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.on('pointerupoutside', event => { |
|
|
|
|
|
|
|
if (event.currentTarget.dragging) { |
|
|
|
|
|
|
|
event.currentTarget.alpha = 1; |
|
|
|
|
|
|
|
event.currentTarget.dragging = false; |
|
|
|
|
|
|
|
event.currentTarget.data = null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.on('pointermove', event => { |
|
|
|
|
|
|
|
if (event.currentTarget.dragging) { |
|
|
|
|
|
|
|
const newPosition = event.currentTarget.data.getLocalPosition(event.currentTarget.parent); |
|
|
|
|
|
|
|
var startPos = this.position; |
|
|
|
|
|
|
|
var endPos = this.workingArea.backgroundImage.toLocal(this.toGlobal(newPosition)); |
|
|
|
|
|
|
|
var width = (endPos.x - startPos.x);
|
|
|
|
|
|
|
|
var height = (endPos.y - startPos.y); |
|
|
|
|
|
|
|
var scaleX = width / (this.width / this.scale.x); |
|
|
|
|
|
|
|
var scaleY = height / (this.width / this.scale.x); |
|
|
|
|
|
|
|
var angle = Math.abs(this.angle); |
|
|
|
|
|
|
|
console.log(angle); |
|
|
|
|
|
|
|
if (angle === 0) { |
|
|
|
|
|
|
|
this.scale.set(scaleX); |
|
|
|
|
|
|
|
} else if (angle === 90) { |
|
|
|
|
|
|
|
this.scale.set(-scaleY); |
|
|
|
|
|
|
|
} else if (angle === 180) {
|
|
|
|
|
|
|
|
this.scale.set(-scaleX); |
|
|
|
|
|
|
|
} else if (angle === 270) { |
|
|
|
|
|
|
|
this.scale.set(scaleY); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.assetData.Scale = this.scale.x; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.on('rightclick', event => { |
|
|
|
|
|
|
|
this.border.visible = false; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
// this.addChild(this.downLeft);
|
|
|
|
|
|
|
|
this.downLeft.anchor.set(0.5); |
|
|
|
|
|
|
|
this.downLeft.interactive = true; |
|
|
|
|
|
|
|
this.downLeft.visible = false; |
|
|
|
|
|
|
|
this.downLeft |
|
|
|
|
|
|
|
.on('pointerdown', event => { |
|
|
|
|
|
|
|
event.stopPropagation(); |
|
|
|
|
|
|
|
event.currentTarget.data = event.data; |
|
|
|
|
|
|
|
event.currentTarget.alpha = 0.5; |
|
|
|
|
|
|
|
event.currentTarget.dragging = true; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
event.currentTarget.dragPoint = event.data.getLocalPosition(event.currentTarget.parent); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var pointStart = this.position; |
|
|
|
|
|
|
|
var pointEnd = this.workingArea.backgroundImage.toLocal(this.toGlobal(this.upRight.position)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const delX = pointEnd.x - pointStart.x; |
|
|
|
|
|
|
|
const delY = pointEnd.y - pointStart.y; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.pivot.set(this.upRight.x, this.upRight.y); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.position.x += delX; |
|
|
|
|
|
|
|
this.position.y += delY; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.assetData.PivotX = this.pivot.x; |
|
|
|
|
|
|
|
this.assetData.PivotY = this.pivot.y; |
|
|
|
|
|
|
|
this.assetData.Point = new Point(this.x, this.y); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.on('pointerup', event => { |
|
|
|
|
|
|
|
if (event.currentTarget.dragging) { |
|
|
|
|
|
|
|
event.currentTarget.alpha = 1; |
|
|
|
|
|
|
|
event.currentTarget.dragging = false; |
|
|
|
|
|
|
|
event.currentTarget.data = null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.on('pointerupoutside', event => { |
|
|
|
|
|
|
|
if (event.currentTarget.dragging) { |
|
|
|
|
|
|
|
event.currentTarget.alpha = 1; |
|
|
|
|
|
|
|
event.currentTarget.dragging = false; |
|
|
|
|
|
|
|
event.currentTarget.data = null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.on('pointermove', event => { |
|
|
|
|
|
|
|
if (event.currentTarget.dragging) { |
|
|
|
|
|
|
|
const newPosition = event.currentTarget.data.getLocalPosition(event.currentTarget.parent); |
|
|
|
|
|
|
|
var startPos = this.position; |
|
|
|
|
|
|
|
var endPos = this.workingArea.backgroundImage.toLocal(this.toGlobal(newPosition)); |
|
|
|
|
|
|
|
var width = (endPos.x - startPos.x);
|
|
|
|
|
|
|
|
var height = (endPos.y - startPos.y); |
|
|
|
|
|
|
|
var scaleX = width / (this.width / this.scale.x); |
|
|
|
|
|
|
|
var scaleY = height / (this.width / this.scale.x); |
|
|
|
|
|
|
|
var angle = Math.abs(this.angle); |
|
|
|
|
|
|
|
console.log(angle); |
|
|
|
|
|
|
|
if (angle === 0) { |
|
|
|
|
|
|
|
this.scale.set(-scaleX); |
|
|
|
|
|
|
|
} else if (angle === 90) { |
|
|
|
|
|
|
|
this.scale.set(scaleY); |
|
|
|
|
|
|
|
} else if (angle === 180) {
|
|
|
|
|
|
|
|
this.scale.set(scaleX); |
|
|
|
|
|
|
|
} else if (angle === 270) { |
|
|
|
|
|
|
|
this.scale.set(-scaleY); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.assetData.Scale = this.scale.x; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.on('rightclick', event => { |
|
|
|
|
|
|
|
this.border.visible = false; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
// this.addChild(this.downRight);
|
|
|
|
|
|
|
|
this.downRight.anchor.set(0.5); |
|
|
|
|
|
|
|
this.downRight.interactive = true; |
|
|
|
|
|
|
|
this.downRight.visible = false; |
|
|
|
|
|
|
|
this.downRight |
|
|
|
|
|
|
|
.on('pointerdown', event => { |
|
|
|
|
|
|
|
event.stopPropagation(); |
|
|
|
|
|
|
|
event.currentTarget.data = event.data; |
|
|
|
|
|
|
|
event.currentTarget.alpha = 0.5; |
|
|
|
|
|
|
|
event.currentTarget.dragging = true; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
event.currentTarget.dragPoint = event.data.getLocalPosition(event.currentTarget.parent); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var pointStart = this.position; |
|
|
|
|
|
|
|
var pointEnd = this.workingArea.backgroundImage.toLocal(this.toGlobal(this.upLeft.position)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const delX = pointEnd.x - pointStart.x; |
|
|
|
|
|
|
|
const delY = pointEnd.y - pointStart.y; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.pivot.set(this.upLeft.x, this.upLeft.y); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.position.x += delX; |
|
|
|
|
|
|
|
this.position.y += delY; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.assetData.PivotX = this.pivot.x; |
|
|
|
|
|
|
|
this.assetData.PivotY = this.pivot.y; |
|
|
|
|
|
|
|
this.assetData.Point = new Point(this.x, this.y); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.on('pointerup', event => { |
|
|
|
|
|
|
|
if (event.currentTarget.dragging) { |
|
|
|
|
|
|
|
event.currentTarget.alpha = 1; |
|
|
|
|
|
|
|
event.currentTarget.dragging = false; |
|
|
|
|
|
|
|
event.currentTarget.data = null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.on('pointerupoutside', event => { |
|
|
|
|
|
|
|
if (event.currentTarget.dragging) { |
|
|
|
|
|
|
|
event.currentTarget.alpha = 1; |
|
|
|
|
|
|
|
event.currentTarget.dragging = false; |
|
|
|
|
|
|
|
event.currentTarget.data = null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.on('pointermove', event => { |
|
|
|
|
|
|
|
if (event.currentTarget.dragging) { |
|
|
|
|
|
|
|
const newPosition = event.currentTarget.data.getLocalPosition(event.currentTarget.parent); |
|
|
|
|
|
|
|
var startPos = this.position; |
|
|
|
|
|
|
|
var endPos = this.workingArea.backgroundImage.toLocal(this.toGlobal(newPosition)); |
|
|
|
|
|
|
|
var width = (endPos.x - startPos.x);
|
|
|
|
|
|
|
|
var height = (endPos.y - startPos.y); |
|
|
|
|
|
|
|
var scaleX = width / (this.width / this.scale.x); |
|
|
|
|
|
|
|
var scaleY = height / (this.width / this.scale.x); |
|
|
|
|
|
|
|
var angle = Math.abs(this.angle); |
|
|
|
|
|
|
|
console.log(angle); |
|
|
|
|
|
|
|
if (angle === 0) { |
|
|
|
|
|
|
|
this.scale.set(scaleX); |
|
|
|
|
|
|
|
} else if (angle === 90) { |
|
|
|
|
|
|
|
this.scale.set(-scaleY); |
|
|
|
|
|
|
|
} else if (angle === 180) {
|
|
|
|
|
|
|
|
this.scale.set(-scaleX); |
|
|
|
|
|
|
|
} else if (angle === 270) { |
|
|
|
|
|
|
|
this.scale.set(scaleY); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.assetData.Scale = this.scale.x; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
.on('rightclick', event => { |
|
|
|
|
|
|
|
this.border.visible = false; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 设置点显示状态 |
|
|
|
|
|
|
|
* @param value 显示状态 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public setPointVisiable(value: boolean) { |
|
|
|
|
|
|
|
let rect = this.getLocalBounds(); |
|
|
|
|
|
|
|
this.upLeft.x = rect.left; |
|
|
|
|
|
|
|
this.upLeft.y = rect.top; |
|
|
|
|
|
|
|
this.upRight.x = rect.right; |
|
|
|
|
|
|
|
this.upRight.y = rect.top; |
|
|
|
|
|
|
|
this.downLeft.x = rect.left; |
|
|
|
|
|
|
|
this.downLeft.y = rect.bottom; |
|
|
|
|
|
|
|
this.downRight.x = rect.right; |
|
|
|
|
|
|
|
this.downRight.y = rect.bottom; |
|
|
|
|
|
|
|
this.upLeft.visible = value; |
|
|
|
|
|
|
|
this.upRight.visible = value; |
|
|
|
|
|
|
|
this.downLeft.visible = value; |
|
|
|
|
|
|
|
this.downRight.visible = value; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param scale 绘制边框 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public drawBorder(scale: number) { |
|
|
|
|
|
|
|
let visible = this.upLeft.visible; |
|
|
|
|
|
|
|
console.log(visible); |
|
|
|
|
|
|
|
this.setPointVisiable(false); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
super.drawBorder(scale); |
|
|
|
|
|
|
|
let rect = this.getLocalBounds(); |
|
|
|
|
|
|
|
this.upLeft.x = rect.left; |
|
|
|
|
|
|
|
this.upLeft.y = rect.top; |
|
|
|
|
|
|
|
this.upRight.x = rect.right; |
|
|
|
|
|
|
|
this.upRight.y = rect.top; |
|
|
|
|
|
|
|
this.downLeft.x = rect.left; |
|
|
|
|
|
|
|
this.downLeft.y = rect.bottom; |
|
|
|
|
|
|
|
this.downRight.x = rect.right; |
|
|
|
|
|
|
|
this.downRight.y = rect.bottom; |
|
|
|
|
|
|
|
this.setPointVisiable(visible); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|