微调
This commit is contained in:
parent
d541e1445b
commit
4131233113
@ -261,9 +261,9 @@ export function loadDrawDatas(app: GraphicApp) {
|
||||
storage.links.forEach((link) => {
|
||||
datas.push(new LinkData(link));
|
||||
});
|
||||
/* storage.Rects.forEach((rect) => {
|
||||
storage.Rects.forEach((rect) => {
|
||||
datas.push(new RectData(rect));
|
||||
}); */
|
||||
});
|
||||
storage.iscsFans.forEach((fan) => {
|
||||
datas.push(new IscsFanData(fan));
|
||||
});
|
||||
|
@ -93,9 +93,12 @@ export class RectDraw extends GraphicDrawAssistant<RectTemplate, IRectData> {
|
||||
return [x, y, w, h];
|
||||
}
|
||||
prepareData(data: IRectData): boolean {
|
||||
if (this.point1 == null) {
|
||||
console.log('Rect绘制因点不够取消绘制');
|
||||
return false;
|
||||
}
|
||||
const p1 = this.point1 as Point;
|
||||
const p2 = this.point2 as Point;
|
||||
if (p1 !== null) {
|
||||
const [x, y, width, height] = this.normalize(p1, p2);
|
||||
const template = this.graphicTemplate;
|
||||
data.point = new Point(x, y);
|
||||
@ -103,7 +106,6 @@ export class RectDraw extends GraphicDrawAssistant<RectTemplate, IRectData> {
|
||||
data.lineColor = template.lineColor;
|
||||
data.width = width;
|
||||
data.height = height;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user