|
@@ -891,8 +891,11 @@ export default class Draw {
|
|
|
this.context.save()
|
|
|
|
|
|
this.context.translate(pt.x, pt.y)
|
|
|
- this.context.rotate((geometry.angle / 180) * Math.PI)
|
|
|
this.context.scale(geometry.scale,geometry.scale)
|
|
|
+ this.context.translate(-1*geometry.ratio*geometry.width/4, -1*geometry.ratio*geometry.height/4)
|
|
|
+ this.context.rotate((geometry.angle / 180) * Math.PI)
|
|
|
+ this.context.translate(geometry.ratio*geometry.width/4, geometry.ratio*geometry.height/4)
|
|
|
+
|
|
|
|
|
|
if(geometry.image == null)
|
|
|
{
|
|
@@ -916,7 +919,21 @@ export default class Draw {
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+ const focusItem = stateService.getFocusItem()
|
|
|
+ if (focusItem && focusItem.type == VectorType.CustomImage) {
|
|
|
+ if (geometry.vectorId == focusItem.vectorId) {
|
|
|
+ this.context.strokeStyle = Style.Select.Tag.strokeStyle
|
|
|
+ this.context.fillStyle = Style.Select.Tag.fillStyle
|
|
|
+ this.context.strokeRect( -geometry.ratio * geometry.width/2, -geometry.ratio * geometry.height/2, geometry.ratio * geometry.width/2, geometry.ratio * geometry.height/2)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
this.context.restore()
|
|
|
+ // this.context.beginPath()
|
|
|
+ // this.context.arc(pt.x, pt.y, 2 * coordinate.ratio, 0, Math.PI * 2, true)
|
|
|
+ // this.context.stroke()
|
|
|
+ // this.context.fill()
|
|
|
+ // this.context.restore()
|
|
|
}
|
|
|
}
|
|
|
|