|
@@ -212,7 +212,7 @@ export default class Draw {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- this.context.font = `400 ${geometry.fontSize}px Microsoft YaHei`
|
|
|
+ this.context.font = `400 ${geometry.fontSize* coordinate.ratio}px Microsoft YaHei`
|
|
|
|
|
|
//根据文字的长度,更新标注范围
|
|
|
//geometry.sideWidth = Math.max(this.context.measureText(geometry.value).width, this.context.measureText(parseFloat(geometry.value).toFixed(2)).width)
|
|
@@ -287,9 +287,8 @@ export default class Draw {
|
|
|
}
|
|
|
|
|
|
drawCell(geometry,width,height){
|
|
|
-
|
|
|
this.context.save()
|
|
|
- this.context.lineWidth = Style.Table.lineWidth
|
|
|
+ this.context.lineWidth = Style.Table.lineWidth * coordinate.ratio
|
|
|
this.context.strokeStyle = Style.Table.strokeStyle
|
|
|
this.context.fillStyle = Style.Table.fillStyle
|
|
|
|
|
@@ -459,7 +458,10 @@ export default class Draw {
|
|
|
const pt = coordinate.getScreenXY(geometry.center)
|
|
|
|
|
|
this.context.save()
|
|
|
+
|
|
|
+ this.context.lineWidth = Style.Circle.lineWidth * coordinate.ratio
|
|
|
this.context.strokeStyle = geometry.color
|
|
|
+
|
|
|
const selectItem = stateService.getSelectItem()
|
|
|
const draggingItem = stateService.getDraggingItem()
|
|
|
const focusItem = stateService.getFocusItem()
|
|
@@ -1097,7 +1099,7 @@ export default class Draw {
|
|
|
this.context.font = 12*coordinate.ratio+`px Microsoft YaHei`
|
|
|
let value = '角度:'+geometry.angle + '°';
|
|
|
let fontWidth = this.context.measureText(value).width
|
|
|
- this.context.fillText(value, (geometry.center.x*coordinate.ratio-fontWidth/5), (geometry.center.y+70)*coordinate.ratio)
|
|
|
+ this.context.fillText(value, (geometry.center.x*coordinate.ratio-fontWidth/5), (geometry.center.y+85)*coordinate.ratio)
|
|
|
this.context.restore()
|
|
|
}
|
|
|
|