|
|
@ -32,6 +32,7 @@ export class AxLegend extends AxShape { |
|
|
|
this.y = this.assetData.Point.y; |
|
|
|
this.y = this.assetData.Point.y; |
|
|
|
this.scale.set(this.assetData.Scale); |
|
|
|
this.scale.set(this.assetData.Scale); |
|
|
|
this.shapeMap = shapeMap; |
|
|
|
this.shapeMap = shapeMap; |
|
|
|
|
|
|
|
this.createPoint(); |
|
|
|
this.refresh(); |
|
|
|
this.refresh(); |
|
|
|
} |
|
|
|
} |
|
|
|
// 添加数据
|
|
|
|
// 添加数据
|
|
|
@ -119,6 +120,16 @@ export class AxLegend extends AxShape { |
|
|
|
this.addChild(this.border); |
|
|
|
this.addChild(this.border); |
|
|
|
// 添加控制点
|
|
|
|
// 添加控制点
|
|
|
|
this.addChild(this.upLeft); |
|
|
|
this.addChild(this.upLeft); |
|
|
|
|
|
|
|
this.addChild(this.upRight); |
|
|
|
|
|
|
|
this.addChild(this.downLeft); |
|
|
|
|
|
|
|
this.addChild(this.downRight); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.anchor.set(0.5); |
|
|
|
this.upLeft.interactive = true; |
|
|
|
this.upLeft.interactive = true; |
|
|
|
this.upLeft.visible = false; |
|
|
|
this.upLeft.visible = false; |
|
|
@ -186,7 +197,7 @@ export class AxLegend extends AxShape { |
|
|
|
.on('rightclick', event => { |
|
|
|
.on('rightclick', event => { |
|
|
|
this.border.visible = false; |
|
|
|
this.border.visible = false; |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.addChild(this.upRight); |
|
|
|
// this.addChild(this.upRight);
|
|
|
|
this.upRight.anchor.set(0.5); |
|
|
|
this.upRight.anchor.set(0.5); |
|
|
|
this.upRight.interactive = true; |
|
|
|
this.upRight.interactive = true; |
|
|
|
this.upRight.visible = false; |
|
|
|
this.upRight.visible = false; |
|
|
@ -254,7 +265,7 @@ export class AxLegend extends AxShape { |
|
|
|
.on('rightclick', event => { |
|
|
|
.on('rightclick', event => { |
|
|
|
this.border.visible = false; |
|
|
|
this.border.visible = false; |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.addChild(this.downLeft); |
|
|
|
// this.addChild(this.downLeft);
|
|
|
|
this.downLeft.anchor.set(0.5); |
|
|
|
this.downLeft.anchor.set(0.5); |
|
|
|
this.downLeft.interactive = true; |
|
|
|
this.downLeft.interactive = true; |
|
|
|
this.downLeft.visible = false; |
|
|
|
this.downLeft.visible = false; |
|
|
@ -322,7 +333,7 @@ export class AxLegend extends AxShape { |
|
|
|
.on('rightclick', event => { |
|
|
|
.on('rightclick', event => { |
|
|
|
this.border.visible = false; |
|
|
|
this.border.visible = false; |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.addChild(this.downRight); |
|
|
|
// this.addChild(this.downRight);
|
|
|
|
this.downRight.anchor.set(0.5); |
|
|
|
this.downRight.anchor.set(0.5); |
|
|
|
this.downRight.interactive = true; |
|
|
|
this.downRight.interactive = true; |
|
|
|
this.downRight.visible = false; |
|
|
|
this.downRight.visible = false; |
|
|
@ -390,7 +401,6 @@ export class AxLegend extends AxShape { |
|
|
|
.on('rightclick', event => { |
|
|
|
.on('rightclick', event => { |
|
|
|
this.border.visible = false; |
|
|
|
this.border.visible = false; |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.angle = -this.workingArea.backgroundImage.angle; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 设置点显示状态 |
|
|
|
* 设置点显示状态 |
|
|
@ -417,6 +427,7 @@ export class AxLegend extends AxShape { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public drawBorder(scale: number) { |
|
|
|
public drawBorder(scale: number) { |
|
|
|
let visible = this.upLeft.visible; |
|
|
|
let visible = this.upLeft.visible; |
|
|
|
|
|
|
|
console.log(visible); |
|
|
|
this.setPointVisiable(false); |
|
|
|
this.setPointVisiable(false); |
|
|
|
|
|
|
|
|
|
|
|
super.drawBorder(scale); |
|
|
|
super.drawBorder(scale); |
|
|
|