|
@@ -1,5 +1,5 @@
|
|
|
import { SPolylineItem, ItemOrder, SItemStatus } from '@saga-web/big/lib'
|
|
|
-import { SPainter, SColor } from '@saga-web/draw'
|
|
|
+import { SPainter, SColor, SRect } from '@saga-web/draw'
|
|
|
import { SAnchorItem, SGraphItem } from '@saga-web/graph/lib'
|
|
|
import { Relation } from '../types/Relation'
|
|
|
import { SPoint } from '@saga-web/draw/lib'
|
|
@@ -156,28 +156,46 @@ export class TipelineItem extends SPolylineItem {
|
|
|
return this.data
|
|
|
}
|
|
|
|
|
|
- onDraw(painter: SPainter) {
|
|
|
+ // onDraw(painter: SPainter) {
|
|
|
+ // if (this.maskFlag && this.status == SItemStatus.Normal) {
|
|
|
+ // let color = new SColor(this.strokeColor)
|
|
|
+ // color.alpha = color.alpha / 8
|
|
|
+ // painter.pen.color = color
|
|
|
+
|
|
|
+ // if (this.selected) {
|
|
|
+ // painter.pen.lineWidth = painter.toPx(this.lineWidth * 2);
|
|
|
+ // painter.shadow.shadowBlur = 10;
|
|
|
+ // painter.shadow.shadowColor = new SColor(`#00000033`);
|
|
|
+ // painter.shadow.shadowOffsetX = 5;
|
|
|
+ // painter.shadow.shadowOffsetY = 5;
|
|
|
+ // } else {
|
|
|
+ // painter.pen.lineWidth = painter.toPx(this.lineWidth);
|
|
|
+ // painter.shadow.shadowColor = SColor.Transparent
|
|
|
+ // }
|
|
|
+ // painter.drawPolyline(this.pointList)
|
|
|
+
|
|
|
+ // painter.pen.color = new SColor('#ffffff80')
|
|
|
+ // painter.drawPolyline(this.pointList)
|
|
|
+ // } else {
|
|
|
+ // super.onDraw(painter)
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ /**
|
|
|
+ * Item绘制框架
|
|
|
+ *
|
|
|
+ * @param painter painter对象
|
|
|
+ * @param rect 绘制区域
|
|
|
+ */
|
|
|
+ onPaint(painter: SPainter, rect: SRect): void {
|
|
|
+ super.onPaint(painter, rect);
|
|
|
if (this.maskFlag && this.status == SItemStatus.Normal) {
|
|
|
- let color = new SColor(this.strokeColor)
|
|
|
- color.alpha = color.alpha / 8
|
|
|
- painter.pen.color = color
|
|
|
-
|
|
|
if (this.selected) {
|
|
|
painter.pen.lineWidth = painter.toPx(this.lineWidth * 2);
|
|
|
- painter.shadow.shadowBlur = 10;
|
|
|
- painter.shadow.shadowColor = new SColor(`#00000033`);
|
|
|
- painter.shadow.shadowOffsetX = 5;
|
|
|
- painter.shadow.shadowOffsetY = 5;
|
|
|
} else {
|
|
|
painter.pen.lineWidth = painter.toPx(this.lineWidth);
|
|
|
- painter.shadow.shadowColor = SColor.Transparent
|
|
|
}
|
|
|
- painter.drawPolyline(this.pointList)
|
|
|
-
|
|
|
painter.pen.color = new SColor('#ffffff80')
|
|
|
painter.drawPolyline(this.pointList)
|
|
|
- } else {
|
|
|
- super.onDraw(painter)
|
|
|
}
|
|
|
- }
|
|
|
+ } // Function onPaint()
|
|
|
}
|