Skip to content

Commit 494fbf5

Browse files
authored
Merge pull request #430 from suo-long-ai-mai-dao/suolong_pr
解决:笔记本电脑使用edge浏览器并调整比例到100%时,拖动canvas画布线条异常抖动
2 parents cbe72b2 + 21db3b5 commit 494fbf5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/platforms/vue2/src/core4vue/RGCanvas.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ export default {
6868
return {
6969
'width': `${this.options.canvasSize.width }px`,
7070
'height': `${this.options.canvasSize.height }px`,
71-
'margin-left': `${this.options.canvasOffset.x }px`,
72-
'margin-top': `${this.options.canvasOffset.y }px`,
71+
// 'margin-left': `${this.options.canvasOffset.x }px`,
72+
// 'margin-top': `${this.options.canvasOffset.y }px`,
7373
'background-color': 'transparent',
74-
'transform': `scale(${ this.options.canvasZoom / 100 },${ this.options.canvasZoom / 100 })`
74+
'transform': `translate(${this.options.canvasOffset.x }px, ${this.options.canvasOffset.y }px) scale(${ this.options.canvasZoom / 100 },${ this.options.canvasZoom / 100 })`
7575
// 'transform-origin': (this.options.canvasOffset.zoom_buff_x * 100).toFixed(2) + '% ' + (this.options.canvasOffset.zoom_buff_y * 100).toFixed(2) + '%'
7676
};
7777
}

0 commit comments

Comments
 (0)