Fixed overlap between drawing canvas and preview.

This commit is contained in:
juliandescottes 2012-09-16 23:34:00 +02:00
parent 8bee1fe4f3
commit 016649bb46
2 changed files with 2 additions and 5 deletions

View File

@ -2,7 +2,7 @@
.preview-container { .preview-container {
position : absolute; position : absolute;
bottom : 0; right : 0; bottom : 0; right : 0;
height : 285px; height : 282px;
width : 256px; width : 256px;
background : white; background : white;
border : 0px Solid black; border : 0px Solid black;
@ -12,7 +12,6 @@
.preview-container canvas { .preview-container canvas {
border : 0px Solid transparent; border : 0px Solid transparent;
border-radius:5px 0px 0px 5px;
} }
#preview-fps { #preview-fps {

View File

@ -205,8 +205,6 @@
ns.DrawingController.prototype.renderFrame = function () { ns.DrawingController.prototype.renderFrame = function () {
var frame = this.framesheet.getCurrentFrame(); var frame = this.framesheet.getCurrentFrame();
console.log("render", frame.getHeight());
if (frame.getHeight() == 32) debugger;
var serializedFrame = frame.serialize(); var serializedFrame = frame.serialize();
if (this.serializedFrame != serializedFrame) { if (this.serializedFrame != serializedFrame) {
this.serializedFrame = serializedFrame; this.serializedFrame = serializedFrame;
@ -250,7 +248,7 @@
// Calculate the DPI change needed to bridge height and width gap // Calculate the DPI change needed to bridge height and width gap
var gapDPI = pskl.PixelUtils.calculateDPI(heightGap, widthGap, framePixelHeight, framePixelWidth); var gapDPI = pskl.PixelUtils.calculateDPI(heightGap, widthGap, framePixelHeight, framePixelWidth);
// substract gap dpi to initial dpi // substract gap dpi to initial dpi
dpi -= (gapDPI - 1); dpi -= (gapDPI + 1);
} }
return dpi; return dpi;
}; };