# HG changeset patch # User Alexandre Segura # Date 1489509602 -3600 # Node ID 924d95c071496682e6322c19fd6a6b4c4e502763 # Parent 616fc1fad25f89f5c8ad402466b19560d5daa6ae Preserve ratio on zoom. diff -r 616fc1fad25f -r 924d95c07149 src_js/iconolab-bundle/src/components/editor/Canvas.vue --- a/src_js/iconolab-bundle/src/components/editor/Canvas.vue Tue Mar 14 17:02:43 2017 +0100 +++ b/src_js/iconolab-bundle/src/components/editor/Canvas.vue Tue Mar 14 17:40:02 2017 +0100 @@ -234,8 +234,8 @@ } else { var center = this.getCenter(); - var viewBoxW = this.imgMinSize - (this.imgMinSize * factor); - var viewBoxH = viewBoxW; + var viewBoxW = this.imageWidth - (this.imageWidth * factor); + var viewBoxH = this.imageHeight - (this.imageHeight * factor); var viewBox = [ center.x - viewBoxW / 2,