From 8ff15fd0e12df0f69a8eac410638ae34ae7a940d Mon Sep 17 00:00:00 2001 From: James Lissiak Date: Mon, 1 Jun 2015 10:50:58 -0700 Subject: [PATCH] Fixing the preview frame grid stroke - The width/height of the canvas used to draw the frame grid in the preview was incorrect, so the stroke width was too thick - This change fixes it so the stroke width remains nice and thin by applying the correct canvas size --- src/js/controller/dialogs/ImportImageController.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/js/controller/dialogs/ImportImageController.js b/src/js/controller/dialogs/ImportImageController.js index c501e624..ae40c140 100644 --- a/src/js/controller/dialogs/ImportImageController.js +++ b/src/js/controller/dialogs/ImportImageController.js @@ -55,12 +55,14 @@ var height = this.importedImage_.height; var width = this.importedImage_.width; + // Parse the X frame count var frameCountX = parseInt(this.frameCountX.val(), 10); if (frameCountX <= 0 || isNaN(frameCountX)) { this.frameCountX.val(1); frameCountX = 1; } + // Parse the Y frame count var frameCountY = parseInt(this.frameCountY.val(), 10); if (frameCountY <= 0 || isNaN(frameCountY)) { this.frameCountY.val(1); @@ -178,8 +180,8 @@ var countX = this.frameCountX.val(); var countY = this.frameCountY.val(); if (countX > 1 || countY > 1) { - var width = this.importedImage_.width; - var height = this.importedImage_.height; + var width = this.importPreview.width(); + var height = this.importPreview.height(); var frameW = width / countX; var frameH = height / countY;