Skip to content

Commit

Permalink
fix: Correct SVG transformations in GCode Preview (#816)
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Adolf <[email protected]>
  • Loading branch information
rianadon authored Aug 8, 2022
1 parent 9b09655 commit ed5e5d1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/widgets/gcode-preview/GcodePreview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,8 @@ export default class GcodePreview extends Mixins(StateMixin) {
}
const transform = [
this.flipX ? -(x.max - x.min) : 0,
this.flipY ? -(y.max - y.min) : 0
this.flipX ? -(x.max + x.min) : 0,
this.flipY ? -(y.max + y.min) : 0
]
return `scale(${scale.join()}) translate(${transform.join()})`
Expand Down Expand Up @@ -416,7 +416,7 @@ export default class GcodePreview extends Mixins(StateMixin) {
y
} = this.viewBox
return `${x.min} ${y.min} ${x.max} ${y.max}`
return `${x.min} ${y.min} ${x.max - x.min} ${y.max - y.min}`
}
get defaultLayerPaths (): LayerPaths {
Expand Down

0 comments on commit ed5e5d1

Please sign in to comment.